wt.templateutil.table
Class ListContentTableService

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

Deprecated.

public class ListContentTableService
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 is a implementation of an HTML Table Service that provides special support for presenting the contents of a ContentHolder. The object the content is retrieved from is the current Context Object of the TemplateProcessor that is processing the HTML page making the Windchill script calls. For example, if we are looking at the properties page for a WTPart, then the Context Object is the WTPart who properties are being displayed. This will also be the object used to retrieve the list of contents from.

The primary function of this service to allow the retrieval of the contents, both UrlData and ApplicationData, and presents the those contents in two Tables. One table for the UrlData and one Table for the ApplicationData. The display characteristics of the tables are separately controlled as is presentation. So the tables can either look the same or they can look different. The tables can be presented one after the other or in different parts of the Page.

Currently, AggregateData is not supported. It will be in the future.

To use ListContentTableService, the following Windchill script call needs to be made

tableService action=initializeContents

After this call, the URLData contents and the ApplicationData contents are available to be displayed. There is a call to initialize the HTMLTable object for each type of content. This allows the two tables to be controlled, both in style and position, separately.

For URLData, the following call initializes a WTHtmlTable to present the URLData

tableService action=initURLDataTable URLDATAATTRIBUTES=urlLocation,description

For ApplicationData, the following call initializes a WTHtmlTable to present the ApplicationData

tableService action=INITAPPLICATIONDATATABLE APPLICATIONDATAATTRIBUTES=fileName,format,fileSize,modifyTimestamp,createdBy

Once these WTHtmlTable are created, the rest of the HTML Table Services are available customize them, as shown below.

An example of using the ListContentTableService is :

<SCRIPT LANGUAGE=Windchill>
<!--
tableService action=initializeContents
tableService action=initURLDataTable URLDATAATTRIBUTES=urlLocation,description
tableService action=setHeaderAttributes name=ALL font.size=2 th.align=left
tableService action=setColumnAttributes name=ALL font.size=2 td.bgcolor=#e3e3cf
tableService action=setTableAttributes table.width=100%
tableService action=show
-->
</SCRIPT>
<SCRIPT LANGUAGE=Windchill>>
<!--
tableService action=INITAPPLICATIONDATATABLE APPLICATIONDATAATTRIBUTES=fileName,format,fileSize,modifyTimestamp,createdBy
tableService action=setHeaderFromResource POSITION=4 RESOURCEBUNDLE=wt.enterprise.enterpriseResource RESOURCEKEY=UPDATED_BY
tableService action=setHeaderAttributes name=ALL font.size=2 th.align=left
tableService action=setColumnAttributes name=ALL font.size=2 td.bgcolor=#e3e3cf
tableService action=setTableAttributes table.width=100%
tableService action=show
-->
</SCRIPT>

There might be some line wrapping in the text above. All proper Windchill script lines above should begin with tableService.



Supported API: true

Extendable: false


Field Summary
 
Fields inherited from interface wt.templateutil.table.HTMLTableServiceEventListener
HTML_TABLE
 
Method Summary
 HTMLTable getHtmlTable()
          Deprecated.  
 void initApplicationDataTable(Properties props, Locale locale, OutputStream os)
          Deprecated.  
 void initializeContents(Properties props, Locale locale, OutputStream os)
          Deprecated.  
 void initURLDataTable(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 setHtmlTable(HTMLTable a_HtmlTable)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 ListContentTableService.ACTION in the props parameter.

If either props == null or there is not a value for ListContentTableService.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

initURLDataTable

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

Initializes the WTHtmlTable ( using a RowDataTableModel ) that will be used to generate the table that presents the URLData in the Context Object. The current HTMLTable instance to be used in the HTML Table Service is set to this new WTHtmlTable

The Basic format of the Windchill script call is

tableService action=initURLDataTable URLDATAATTRIBUTES=<Comma separated list of attributes/column handles>

Some additional parameters that can be passed in the Windchill Script call are



Supported API: true

Parameters:
props -
locale -
os -
Throws:
WTException

initApplicationDataTable

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

Initializes the WTHtmlTable ( using a RowDataTableModel ) that will be used to generate the table that presents the ApplicationData in the Context Object. The current HTMLTable instance to be used in the HTML Table Service is set to this new WTHtmlTable.

The Basic format of the Windchill script call is

tableService action=initApplicationDataTable APPLICATIONDATAATTRIBUTES=<Comma separated list of attributes/column handles>

Some additional parameters that can be passed in the Windchill Script call are



Supported API: true

Parameters:
props -
locale -
os -
Throws:
WTException

initializeContents

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

Initializes the URLData Vector and the ApplicationData Vector from from current Context Object for the TemplateProcessor processing the HTML template from which the Windchill script call was made.

Supported API: true

Parameters:
props -
locale -
os -
Throws:
WTException

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