|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.templateutil.table.BasicTableService
Deprecation Notice: This class is still valid for this release, however
this serves as advance notice that it will be removed in the future.
All user interfaces built using the Windchill HTML Template Processing
client architecture will be rewritten using a different framework in
an upcoming release.
This Table Service can be used, in general, with any HTMLTable object
or subclass of HTMLTable.
There are several methods that require an additional interface to
be implemented by either the TableModel used by the HTMLTable instance
or the HTMLTable instance itself.
The primary purpose of this service is to allow basic manipulation of HTMLTable objects via Windchill Script calls. Some examples of these manipulations are
For what methods perform these actions and the syntax for these
Windchill script
methods, please see the javadoc for the methods.
Supported API: true
Extendable: false
Field Summary | |
static String |
ACTION
Deprecated. |
static String |
addColumn
Deprecated. |
static String |
ADDCOLUMN
Deprecated. |
static String |
ADDCOLUMNS
Deprecated. |
static String |
ALL
Deprecated. |
static String |
CELL_COMPONENT
Deprecated. |
private static String |
CLASSNAME
Deprecated. |
static String |
COLUMN_NAME
Deprecated. |
static String |
COLUMNCLASS
Deprecated. |
static String |
CONTEXT_OBJ_ACTION_BAR
Deprecated. |
static String |
CONTEXT_OBJ_ACTION_LIST
Deprecated. |
static String |
DEFINEACTIONBAR
Deprecated. |
static String |
DELETECOLUMN
Deprecated. |
static String |
DELETECOLUMNS
Deprecated. |
static String |
DISPLAY_HEADERS
Deprecated. |
static String |
ENABLECOLUMNCOLLAPSE
Deprecated. |
static String |
ENABLESORTING
Deprecated. |
static String |
ENTRY_DELIM
Deprecated. |
static String |
FINAL
Deprecated. |
static String |
HEADER_COMPONENT
Deprecated. |
static String |
HIDETABLEHEADER
Deprecated. |
private HTMLTable |
htmlTable
Deprecated. |
static String |
HTTPSTATE
Deprecated. |
static String |
INITIAL
Deprecated. |
static String |
INITQUERYTABLE
Deprecated. |
static String |
IS_ENABLED
Deprecated. |
(package private) String |
messageKey
Deprecated. |
(package private) String |
messageResource
Deprecated. |
static String |
MOVECOLUMN
Deprecated. |
static String |
MULTI_SELECT_ACTION_BAR
Deprecated. |
static String |
MULTI_SELECT_ACTION_LIST
Deprecated. |
static String |
NAME
Deprecated. |
static String |
NAME_LOWERCASE
Deprecated. |
static String |
NAME_VALUE_DELIM
Deprecated. |
static String |
NAMES
Deprecated. |
static String |
POSITION
Deprecated. |
static String |
POSITION_STRING
Deprecated. |
static String |
POSITIONS
Deprecated. |
private static String |
RESOURCE
Deprecated. |
static String |
RESOURCE_BUNDLE
Deprecated. |
static String |
RESOURCE_KEY
Deprecated. |
static String |
SERVICE_NAME
Deprecated. |
static String |
SETALLHEADERFROMTARGETCLASS
Deprecated. |
static String |
SETCELLCOMPONENT
Deprecated. |
static String |
SETCOLUMNATTRIBUTES
Deprecated. |
static String |
SETHEADERATTRIBUTES
Deprecated. |
static String |
SETHEADERCOMPONENT
Deprecated. |
static String |
SETHEADERFROMRESOURCE
Deprecated. |
static String |
SETHEADERFROMTARGETCLASS
Deprecated. |
static String |
SETNAME
Deprecated. |
static String |
SETSERVICENAME
Deprecated. |
static String |
SETTABLEATTRIBUTES
Deprecated. |
static String |
SHOW
Deprecated. |
static String |
TABLE_DOT
Deprecated. |
protected HTMLTableServiceEvent |
tableEvent
Deprecated. |
static String |
TARGET_CLASS
Deprecated. |
static String |
TRUE
Deprecated. |
private static boolean |
VERBOSE
Deprecated. |
Fields inherited from interface wt.templateutil.table.HTMLTableServiceEventListener |
HTML_TABLE |
Constructor Summary | |
BasicTableService()
Deprecated. |
Method Summary | |
void |
addColumn(Properties props,
Locale locale,
OutputStream os)
Deprecated. |
void |
addColumns(Properties props,
Locale locale,
OutputStream os)
Deprecated. |
void |
defineActionBar(Properties props,
Locale locale,
OutputStream os)
Deprecated. Configures the Action Row on the PDMLink HTML Table. |
void |
deleteColumn(Properties props,
Locale locale,
OutputStream os)
Deprecated. |
void |
deleteColumns(Properties props,
Locale locale,
OutputStream os)
Deprecated. |
void |
enableColumnCollapse(Properties props,
Locale locale,
OutputStream os)
Deprecated. Enables or Disables the ability to hide(collapse) columns of a PDMLinkHTMLTable. |
void |
enableSorting(Properties props,
Locale locale,
OutputStream os)
Deprecated. Enables or Disables the ability to sort on a column of a PDMLinkHTMLTable. |
HTMLTable |
getHtmlTable()
Deprecated. |
PrintWriter |
getPrintWriter(OutputStream out,
Locale locale)
Deprecated. |
void |
hideTableHeader(Properties props,
Locale locale,
OutputStream os)
Deprecated. Sets a flag to either suppress the printing of the Table Headers or request the printing of the table headers. |
void |
initQueryResultsTable(Properties props,
Locale locale,
OutputStream os)
Deprecated. |
void |
moveColumn(Properties props,
Locale locale,
OutputStream os)
Deprecated. |
void |
performAction(Properties props,
Locale locale,
OutputStream os)
Deprecated. |
boolean |
performHTMLTableAction(HTMLTableServiceEvent tableServiceEvent)
Deprecated. |
void |
setAllHeaderFromTargetClass(Properties props,
Locale locale,
OutputStream os)
Deprecated. Here is the format of the script call |
void |
setCellComponent(Properties props,
Locale locale,
OutputStream os)
Deprecated. Sets the HTML componenent to be used to render the cell for the specified columns. |
void |
setColumnAttributes(Properties props,
Locale locale,
OutputStream os)
Deprecated. |
void |
setHeaderAttributes(Properties props,
Locale locale,
OutputStream os)
Deprecated. |
void |
setHeaderComponent(Properties props,
Locale locale,
OutputStream os)
Deprecated. Sets the HTML componenent to be used to render the header for the specified columns. |
void |
setHeaderFromResource(Properties props,
Locale locale,
OutputStream os)
Deprecated. Sets the ResourceBundle and the key to use in the ResourceBundle to generate a localized header. |
void |
setHeaderFromTargetClass(Properties props,
Locale locale,
OutputStream os)
Deprecated. Sets the Class to used for introspection for retrieving the localized Display Name of an attribute. |
void |
setHtmlTable(HTMLTable a_HtmlTable)
Deprecated. |
void |
setName(Properties props,
Locale locale,
OutputStream os)
Deprecated. |
void |
setServiceName(Properties props,
Locale locale,
OutputStream os)
Deprecated. Sets the serviceName attribute of the HTMLTable. |
void |
setTableAttributes(Properties props,
Locale locale,
OutputStream os)
Deprecated. |
void |
show(Properties props,
Locale locale,
OutputStream os)
Deprecated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
public static final String ACTION
public static final String ENTRY_DELIM
public static final String NAME_VALUE_DELIM
public static final String ALL
private HTMLTable htmlTable
private static final boolean VERBOSE
public static final String SHOW
public static final String ADDCOLUMN
public static final String DELETECOLUMN
public static final String MOVECOLUMN
public static final String ADDCOLUMNS
public static final String DELETECOLUMNS
public static final String SETCOLUMNATTRIBUTES
public static final String SETHEADERATTRIBUTES
public static final String SETTABLEATTRIBUTES
public static final String INITQUERYTABLE
public static final String SETSERVICENAME
public static final String SETCELLCOMPONENT
public static final String SETHEADERCOMPONENT
public static final String HIDETABLEHEADER
public static final String SETHEADERFROMRESOURCE
public static final String SETHEADERFROMTARGETCLASS
public static final String SETALLHEADERFROMTARGETCLASS
public static final String ENABLESORTING
public static final String ENABLECOLUMNCOLLAPSE
public static final String SETNAME
public static final String DEFINEACTIONBAR
public static final String COLUMNCLASS
public static final String addColumn
public static final String TABLE_DOT
public static final String HTTPSTATE
public static final String SERVICE_NAME
public static final String DISPLAY_HEADERS
public static final String CELL_COMPONENT
public static final String HEADER_COMPONENT
public static final String RESOURCE_BUNDLE
public static final String RESOURCE_KEY
public static final String COLUMN_NAME
public static final String POSITION_STRING
public static final String NAME_LOWERCASE
public static final String MULTI_SELECT_ACTION_BAR
public static final String MULTI_SELECT_ACTION_LIST
public static final String CONTEXT_OBJ_ACTION_BAR
public static final String CONTEXT_OBJ_ACTION_LIST
public static final String TARGET_CLASS
public static final String IS_ENABLED
public static final String TRUE
public static final String POSITION
public static final String NAME
public static final String POSITIONS
public static final String NAMES
public static final String INITIAL
public static final String FINAL
protected HTMLTableServiceEvent tableEvent
String messageResource
String messageKey
Constructor Detail |
public BasicTableService()
Method Detail |
public void performAction(Properties props, Locale locale, OutputStream os) throws WTException
If either props == null or there is not a value for BasicTableService.ACTION, an exception is thrown.
The list of valid actions are
For the requirements/details of the individual methods, please
see the javadoc
for those methods directly.
Supported API: true
props
- locale
- os
-
WTException
public void addColumn(Properties props, Locale locale, OutputStream os) throws WTException
It is required that the underlying TableModel implement the AddColumn interface.
The basic syntax of the Windchill script call is :
tableService action=addColumn NAME=<Column Handle or Attribute
Name>
The parameters to that can be passed in are
You can also specify the subclass of the HTMLTableColumn to use when adding the column. The key "COLUMNCLASS" can be used to do this. The value associated to this key must be a fully qualified class path for a subclass of HTMLTableColumn. If you specify this parameter, the column class you specify will be used by the HTMLTableColumnModel to present the cells in that column.
It could be that the underlying TableModel that implements
AddColumn has some
additional contraints of its own, so be sure to see the documentation
on the addColumn method of underlying TableModel's implementation
of the
AddColumn interface.
Supported API: true
props
- locale
- os
-
WTException
public void deleteColumn(Properties props, Locale locale, OutputStream os) throws WTException
There are not any special requirements on the HTMLTable. If you want to use the NAME to specify the column to delete, your TableModel should implement the ColumnIdentifier interface.
There are two basic forms the this command
tableService action=deleteColumn NAME=<Column Handle or Attribute
Name>
or
tableService action=deleteColumn COLUMNNUMBER=<Visual Location
of Column>
The position passed in is a reference is the display position
of the
the column, not the modelIndex of the column in the TableModel.
Supported API: true
props
- locale
- os
-
WTException
public void moveColumn(Properties props, Locale locale, OutputStream os) throws WTException
There are not any special requirements on the HTMLTable or the TableModel.
The basic form the this command is
tableService action=moveColumn INITIAL=<Display Postion of
column to move> FINAL=<Display Postion of column to switch with>
The positions to pass in as arguments are the Visual positions
of the columns
Supported API: true
props
- locale
- os
-
WTException
public void deleteColumns(Properties props, Locale locale, OutputStream os) throws WTException
There are not any special requirements on the HTMLTable. If you want to use the NAMES to specify the columns to delete, your TableModel should implement the ColumnIdentifier interface.
There are two basic forms the this command
tableService action=deleteColumn NAMES=<Comma separated list
of Column Handles or Attribute Names>
or
tableService action=deleteColumn COLUMNNUMBERS=<Comma separated
list of Visual Location of Column>
The position passed in is a reference is the display position
of the
the column, not the modelIndex of the column in the TableModel.
The order of the
of the locations listed will not affect the deletion. It is not
require to have
ascending or descending numbers.
Supported API: true
props
- locale
- os
-
WTException
public void addColumns(Properties props, Locale locale, OutputStream os) throws WTException
It is required that the underlying TableModel implement the AddColumn interface.
The basic syntax of the Windchill script call is :
tableService action=addColumn NAME=<Comma separated list of
Column Handles or Attribute Names>
The parameters to that can be passed in are
You can also specify the subclass of the HTMLTableColumn to use when adding the column. The key "COLUMNCLASS" can be used to do this. The value associated to this key must be a fully qualified class path for a subclass of HTMLTableColumn. If you specify this parameter, the column class you specify will be used by the HTMLTableColumnModel to present the cells in that column. The same column class will be used for all of the columns
It could be that the underlying TableModel that implements
AddColumn has some
additional contraints of its own, so be sure to see the documentation
on the addColumn method of underlying TableModel's implementation
of the
AddColumn interface.
Supported API: true
props
- locale
- os
-
WTException
public void setColumnAttributes(Properties props, Locale locale, OutputStream os) throws WTException
The HTMLTableColumn columnProperties attribute will either be initialized with the name/values pairs passed, if the columnProperties attribute is not not currently set, or will have the new values added to it (Possibly overriding already set values). When the cells in the column represented by the HTMLTableColumn object are rendered, the columnProperties attribute will be passed in to the HTML Component during the init method and the properties will then be available to affect the presentation.
To specify certain display characteristics be overriden, the
name in the
name/values pairs of the Windchill script call need to be meaningful
to
the HTML Components using the name/values pairs (via the columnProperties
attribute).
Supported API: true
props
- locale
- os
-
WTException
public void setHeaderAttributes(Properties props, Locale locale, OutputStream os) throws WTException
The HTMLTableColumn headerProperties attribute will either be initialized with the name/values pairs passed, if the headerProperties attribute is not not currently set, or will have the new values added to it (Possibly overriding already set values). When the header for the column represented by the HTMLTableColumn object is rendered, the headerProperties attribute will be passed in to the HTML Component rendering the header during the init method and the properties will then be available to affect the presentation.
To specify certain display characteristics be overriden, the
name in the
name/values pairs of the Windchill script call need to be meaningful
to
the HTML Components using the name/values pairs (via the headerProperties
attribute).
Supported API: true
props
- locale
- os
-
WTException
public void setTableAttributes(Properties props, Locale locale, OutputStream os) throws WTException
props
- locale
- os
-
WTException
public void show(Properties props, Locale locale, OutputStream os) throws WTException
If there are 1 or more rows in the TableModel to display, the show method on the HTMLTable that is currently using the HTML Table Service is called.
If there are not any rows to display in the TableModel, then the if the messageKey and the messageResource fields are set on the TemplateProcessorTableService instance used by the HTML Table Service, this localized message is displayed.
If there are not any rows in the TableModel and if the messageKey
and the
messageResource fields are not set, nothing is displayed.
Supported API: true
props
- locale
- os
-
WTException
public void initQueryResultsTable(Properties props, Locale locale, OutputStream os) throws WTException
After calling this method, the WTHtmlTable is available to the be customized with Windchill script calls to the HTML Table Service
After customizing the table, a call to the HTML Table Service "show" will display the table.
The basic call has the form
tableService action=initQueryResultsTable QueryName=<Name
of BaseQueryService>
Supported API: true
props
- locale
- os
-
WTException
public PrintWriter getPrintWriter(OutputStream out, Locale locale)
out
- locale
-
public HTMLTable getHtmlTable()
getHtmlTable
in interface HTMLTableServiceEventListener
public void setHtmlTable(HTMLTable a_HtmlTable)
setHtmlTable
in interface HTMLTableServiceEventListener
a_HtmlTable
- public boolean performHTMLTableAction(HTMLTableServiceEvent tableServiceEvent) throws WTException
tableSdrvice action=...
if that action is supported by this HTMLTableServiceEventListener.
If that action is not supported, simply return with a return
value
of false.
Supported API: true
performHTMLTableAction
in interface HTMLTableServiceEventListener
tableServiceEvent
-
WTException
public void setServiceName(Properties props, Locale locale, OutputStream os) throws WTException
The HTMLTable attribute, serviceName, is used to define the "Service Name" in wt.properties that the HTMLTable will use to define the default values for the Headers and Cells in the table.
The default value for the serviceName for HTML components, HTMLTable is an HMTL component, is wt.templateutil.component. So entries of the form
wt.templateutil.component.<HTML Element Name>.<Attribute Name>=<Value>
So use a different set of defaults, set the serviceName and you will be able to use entries in wt.properties of the form
<New serviceName>.<HTML Element Name>.<Attribute Name>=<Value>
The Syntax of the Windchill script call is
tableService action=setServiceName SERVICENAME=<New serviceName>
Supported API: true
props
- locale
-
WTException
public void hideTableHeader(Properties props, Locale locale, OutputStream os) throws WTException
No requirements on the HTMLTable or the TableModel.
The syntax of the method call is
tableService action=hideTableHeader DISPLAYHEADERS=<true/false>
Supported API: true
props
- locale
-
WTException
public void setCellComponent(Properties props, Locale locale, OutputStream os) throws WTException
The TableModel used needs to implement the ColumnIdentifier interface to be able to use this HTML Table Service method.
There are two basic formats to the command
tableService action=setCellComponent CELLCOMPONENT=<Fully qualified classpath of HTMLComponent> COLUMNNUMBER=<Comma separated list of display positions>
or
tableService action=setCellComponent CELLCOMPONENT=<Fully qualified classpath of HTMLComponent> NAME=<Comma separated list of colunm names/handles>
You can use the keyword, ALL, for either the COLUMNNUMBER or the NAME to indicate that you want
the specified CELLCOMPONENT to be used for all of the Columns currently listed in the HTMLTableColumnModel.
Supported API: true
props
- locale
-
WTException
public void setHeaderComponent(Properties props, Locale locale, OutputStream os) throws WTException
The TableModel used needs to implement the ColumnIdentifier interface to be able to use this HTML Table Service method.
There are two basic formats to the command
tableService action=setHeaderComponent HEADERCOMPONENT=<Fully qualified classpath of HTMLComponent> COLUMNNUMBER=<Comma separated list of display positions>
or
tableService action=setHeaderComponent HEADERCOMPONENT=<Fully qualified classpath of HTMLComponent> NAME=<Comma separated list of colunm names/handles>
You can use the keyword, ALL, for either the COLUMNNUMBER or the NAME to indicate that you want
the specified CELLCOMPONENT to be used for all of the Columns currently listed in the HTMLTableColumnModel.
Supported API: true
props
- locale
-
WTException
public void setHeaderFromResource(Properties props, Locale locale, OutputStream os) throws WTException
The TableModel has to implement the TableHeaderSetter interface to be able to this service method.
The two formats for the Windchill script call are
tableService action=setHeaderFromResource RESOURCEBUNDLE=<Fully qualified classpath of ResourceBundle> RESOURCEKEY=<Key in ResourceBundle> COLUMNNAME=<Column handle/name>
or
tableService action=setHeaderFromResource RESOURCEBUNDLE=<Fully qualified classpath of ResourceBundle> RESOURCEKEY=<Key in ResourceBundle> POSITION=<display position>
Supported API: true
props
- locale
-
WTException
public void setHeaderFromTargetClass(Properties props, Locale locale, OutputStream os) throws WTException
The TableModel has to implement the TableHeaderSetter interface to be able to this service method.
The two formats for the Windchill script call are
tableService action=setHeaderFromTargetClass TARGETCLASS=<Fully qualified classpath> COLUMNNAME=<Column handle/name>
or
tableService action=setHeaderFromTargetClass TARGETCLASS=<Fully qualified classpath> POSITION=<Column handle/name>
Supported API: true
props
- locale
-
WTException
public void setName(Properties props, Locale locale, OutputStream os) throws WTException
WTException
public void defineActionBar(Properties props, Locale locale, OutputStream os) throws WTException
Here is the format of the script call
tableService action=defineActionBar multiSelectActionNavBar=<Name of section in Navigation XML config file>
multiSelectActionList=<comma seperated list of link names>
actionNavBar=<Name of section in Navigation XML config file>
actionList=<comma seperated list of link names>
actionListStyleClass=<name of a style class>
The role of the script elements is as follows
props
- locale
-
WTException
public void setAllHeaderFromTargetClass(Properties props, Locale locale, OutputStream os) throws WTException
Here is the format of the script call
tableService action=setAllHeaderFromTargetClass TARGETCLASS=<Fully qualified classpath>
This call will set the target class to use introspection on when generating the header titles for ALL of the columns in the HTML Table
props
- locale
-
WTException
public void enableSorting(Properties props, Locale locale, OutputStream os) throws WTException
There are two formats to this script call
tableService action=enableSorting isEnabled=<true|false>
You can also omit the isEnabled parameter with the call
tableService action=enableSorting
This second form will result in the sorting being enabled.
Supported API: true
props
- locale
-
WTException
public void enableColumnCollapse(Properties props, Locale locale, OutputStream os) throws WTException
There are two formats to this script call
tableService action=enableColumnCollapse isEnabled=<true|false>
You can also omit the isEnabled parameter with the call
tableService action=enableColumnCollapse
This second form will result in the hiding(collapsing) of columns being enabled.
Supported API: true
props
- locale
-
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |