|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwt.templateutil.table.BasicTableService
public class 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 |
ALL
Deprecated. |
static String |
ENTRY_DELIM
Deprecated. |
static String |
NAME_VALUE_DELIM
Deprecated. |
| Fields inherited from interface wt.templateutil.table.HTMLTableServiceEventListener |
|---|
HTML_TABLE |
| 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(wt.templateutil.table.HTMLTableServiceEvent tableServiceEvent)
Deprecated. |
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 |
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 |
|---|
public static final String ACTION
public static final String ENTRY_DELIM
public static final String NAME_VALUE_DELIM
public static final String ALL
| 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 HTMLTableServiceEventListenerpublic void setHtmlTable(HTMLTable a_HtmlTable)
setHtmlTable in interface HTMLTableServiceEventListenera_HtmlTable -
public boolean performHTMLTableAction(wt.templateutil.table.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 HTMLTableServiceEventListenertableServiceEvent -
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 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 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 | ||||||||