wt.templateutil.table
Class BasicTableService

java.lang.Object
  extended by wt.templateutil.table.BasicTableService
All Implemented Interfaces:
HTMLTableServiceEventListener

Deprecated.

public class BasicTableService
extends Object
implements HTMLTableServiceEventListener

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

Here is a full listing of the actions available through the BasicTableService

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

ACTION

public static final String ACTION
Deprecated. 


Supported API: true

See Also:
Constant Field Values

ENTRY_DELIM

public static final String ENTRY_DELIM
Deprecated. 


Supported API: true

See Also:
Constant Field Values

NAME_VALUE_DELIM

public static final String NAME_VALUE_DELIM
Deprecated. 


Supported API: true

See Also:
Constant Field Values

ALL

public static final String ALL
Deprecated. 


Supported API: true

See Also:
Constant Field Values
Method Detail

performAction

public void performAction(Properties props,
                          Locale locale,
                          OutputStream os)
                   throws WTException
Deprecated. 

Performs the action defined by the value of the key BasicTableService.ACTION in the props parameter.

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

Parameters:
props -
locale -
os -
Throws:
WTException

addColumn

public void addColumn(Properties props,
                      Locale locale,
                      OutputStream os)
               throws WTException
Deprecated. 

Adds a new column to the HTMLTable and the underlying TableModel. The visual positioning of the Column can be specified. The HTMLTableColumn class to use can be specified.

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


deleteColumn

public void deleteColumn(Properties props,
                         Locale locale,
                         OutputStream os)
                  throws WTException
Deprecated. 

Deletes a the specified column from the "View". That is, the column is removed from HTMLTableColumnModel but not the TableModel. This means that the data column still exists in the TableModel but that the data for that column will not be presented in the HTML page when the table is generated.

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

Parameters:
props -
locale -
os -
Throws:
WTException

moveColumn

public void moveColumn(Properties props,
                       Locale locale,
                       OutputStream os)
                throws WTException
Deprecated. 

Exchanges the View position of two columns. The position in the TableModel is not affected. It is the position in the HTMLTableColumnModel that is affected. The result is that the visual presentation of the two columns is switched.

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

Parameters:
props -
locale -
os -
Throws:
WTException

deleteColumns

public void deleteColumns(Properties props,
                          Locale locale,
                          OutputStream os)
                   throws WTException
Deprecated. 

Deletes a the specified columns from the "View". That is, the columns are removed from HTMLTableColumnModel but not the TableModel. This means that the data columns still exist in the TableModel but that the data for those columns will not be presented in the HTML page when the table is generated.

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

Parameters:
props -
locale -
os -
Throws:
WTException

addColumns

public void addColumns(Properties props,
                       Locale locale,
                       OutputStream os)
                throws WTException
Deprecated. 

Adds new columns to the HTMLTable and the underlying TableModel. The visual positioning of the Columns can be specified. The HTMLTableColumn class to use can be specified.

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


setColumnAttributes

public void setColumnAttributes(Properties props,
                                Locale locale,
                                OutputStream os)
                         throws WTException
Deprecated. 

Sets/Overrides the column attributes of the column(s) specified. What visual or other presentation characteristics can be manipulated depend on the HTML component(s) being used to render the cells in the column(s).

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

Parameters:
props -
locale -
os -
Throws:
WTException

setHeaderAttributes

public void setHeaderAttributes(Properties props,
                                Locale locale,
                                OutputStream os)
                         throws WTException
Deprecated. 

Sets/Overrides the header display attributes of the column(s) specified. What visual or other presentation characteristics can be manipulated depend on the HTML component(s) being used to render the header of the column(s).

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

Parameters:
props -
locale -
os -
Throws:
WTException

setTableAttributes

public void setTableAttributes(Properties props,
                               Locale locale,
                               OutputStream os)
                        throws WTException
Deprecated. 

If there are attribute values you want to pass on to the HTML Table (that is, the TABLE tag attributes), use this call.

Supported API: true

Parameters:
props -
locale -
os -
Throws:
WTException

show

public void show(Properties props,
                 Locale locale,
                 OutputStream os)
          throws WTException
Deprecated. 

Displays the HTMLTable that is currently using the HTML Table Service.

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

Parameters:
props -
locale -
os -
Throws:
WTException

initQueryResultsTable

public void initQueryResultsTable(Properties props,
                                  Locale locale,
                                  OutputStream os)
                           throws WTException
Deprecated. 

Initializes a WTHtmlTable with a QueryResult, from a subclass of wt.enterprise.tabularresults.BaseQueryService. The RowDataTableModel is used as the TableModel. The call to the BaseQueryService subclass has the current context object passed into it.

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>

The parameters to that can be used on this Windchill script call are



Supported API: true

Parameters:
props -
locale -
os -
Throws:
WTException

getPrintWriter

public PrintWriter getPrintWriter(OutputStream out,
                                  Locale locale)
Deprecated. 

Calls TemplateOutputStream.getPrintWriter on the OutputStream and Locale passed in.

Supported API: true

Parameters:
out -
locale -
Returns:
PrintWriter

getHtmlTable

public HTMLTable getHtmlTable()
Deprecated. 

Gets the value of the attribute: htmlTable.

Supported API: true

Specified by:
getHtmlTable in interface HTMLTableServiceEventListener
Returns:
HTMLTable

setHtmlTable

public void setHtmlTable(HTMLTable a_HtmlTable)
Deprecated. 

Sets the value of the attribute: htmlTable.

Supported API: true

Specified by:
setHtmlTable in interface HTMLTableServiceEventListener
Parameters:
a_HtmlTable -

performHTMLTableAction

public boolean performHTMLTableAction(wt.templateutil.table.HTMLTableServiceEvent tableServiceEvent)
                               throws WTException
Deprecated. 

Peform the action defined by action parameter in the Windchill script call

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

Specified by:
performHTMLTableAction in interface HTMLTableServiceEventListener
Parameters:
tableServiceEvent -
Returns:
boolean
Throws:
WTException

setServiceName

public void setServiceName(Properties props,
                           Locale locale,
                           OutputStream os)
                    throws WTException
Deprecated. 
Sets the serviceName attribute of the HTMLTable.

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

Parameters:
props -
locale -
Throws:
WTException

hideTableHeader

public void hideTableHeader(Properties props,
                            Locale locale,
                            OutputStream os)
                     throws WTException
Deprecated. 
Sets a flag to either suppress the printing of the Table Headers or request the printing of the table headers. By default, the HMTLTable will print the headers.

No requirements on the HTMLTable or the TableModel.

The syntax of the method call is

tableService action=hideTableHeader DISPLAYHEADERS=<true/false>

Supported API: true

Parameters:
props -
locale -
Throws:
WTException

setCellComponent

public void setCellComponent(Properties props,
                             Locale locale,
                             OutputStream os)
                      throws WTException
Deprecated. 
Sets the HTML componenent to be used to render the cell for the specified columns.

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

Parameters:
props -
locale -
Throws:
WTException

setHeaderComponent

public void setHeaderComponent(Properties props,
                               Locale locale,
                               OutputStream os)
                        throws WTException
Deprecated. 
Sets the HTML componenent to be used to render the header for the specified columns.

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

Parameters:
props -
locale -
Throws:
WTException

setHeaderFromResource

public void setHeaderFromResource(Properties props,
                                  Locale locale,
                                  OutputStream os)
                           throws WTException
Deprecated. 
Sets the ResourceBundle and the key to use in the ResourceBundle to generate a localized header.

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

Parameters:
props -
locale -
Throws:
WTException

setHeaderFromTargetClass

public void setHeaderFromTargetClass(Properties props,
                                     Locale locale,
                                     OutputStream os)
                              throws WTException
Deprecated. 
Sets the Class to used for introspection for retrieving the localized Display Name of an attribute. The localized Display name is then used for the header. This assumes that the handle of the column is also the name of an attribute on the class that is being selected to perform introspection on.

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

Parameters:
props -
locale -
Throws:
WTException

defineActionBar

public void defineActionBar(Properties props,
                            Locale locale,
                            OutputStream os)
                     throws WTException
Deprecated. 
Configures the Action Row on the PDMLink HTML Table. This script call requires that the HTMLTable instance is an instance (or subclass) of PDMLinkHTMLTable. Otherwise, a ClassCast exception will be thrown.

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



Supported API: true

Parameters:
props -
locale -
Throws:
WTException

enableSorting

public void enableSorting(Properties props,
                          Locale locale,
                          OutputStream os)
                   throws WTException
Deprecated. 
Enables or Disables the ability to sort on a column of a PDMLinkHTMLTable. If the HTMLTable being used is not an instance of (or subclass of) PDMLinkHTMLTable, a ClassCast exception will be generated. The default setting of the ability to sort the columns of the PDMLinkHTMLTable is true (i.e. enabled).

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

Parameters:
props -
locale -
Throws:
WTException

enableColumnCollapse

public void enableColumnCollapse(Properties props,
                                 Locale locale,
                                 OutputStream os)
                          throws WTException
Deprecated. 
Enables or Disables the ability to hide(collapse) columns of a PDMLinkHTMLTable. If the HTMLTable being used is not an instance of (or subclass of) PDMLinkHTMLTable, a ClassCast exception will be generated. The default setting of the ability to hide(collapse) the columns of the PDMLinkHTMLTable is true (i.e. enabled).

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

Parameters:
props -
locale -
Throws:
WTException