Class AssociationListTableService

java.lang.Object
wt.templateutil.table.AssociationListTableService
All Implemented Interfaces:
HTMLTableServiceEventListener

public class AssociationListTableService extends Object implements HTMLTableServiceEventListener
Deprecated.
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 working with an AssociationTableModel and the WTHtmlTable.

The primary function of this service to allow the specification of an association navigation to be done and presents the results of that navigation in a Table.

The type of navigation to be done can be specified in the Windchill script calls. The columns to present for both BinaryLinks and the OtherSide objects can be specified in the Windchill script. A direct call to a navigation can be done or a subclass of the BaseQueryService can be used to perform the navigation. The direct call to a navigation is the default unless a reference to a subclass of the BaseQueryService is passed in the initAssociationNavigation call.

An example of using the AssociationListTableService that does a Straight Navigation and presents the results is :

<SCRIPT LANGUAGE=Windchill> <BR> <!--
tableService action=initAssociationNavigation ROLE=uses LINKCLASSNAME=wt.part.WTPartUsageLink OTHERSIDECLASS=wt.part.WTPartMaster
tableService action=initAssociationTable othersideattributes=name,number,type linkattributes=modifyTimestamp,quantity
tableService action=setHeaderAttributes COLUMNNUMBER=ALL th.ALIGN=left font.COLOR=blue font.size=1
tableService action=setColumnAttributes name=number,quantity td.ALIGN=left nowrap font.size=5
tableService action=setTableAttributes table.ALIGN=center table.WIDTH=90% table.cellspacing=2 table.cellpadding=2 table.border=4
tableService action=show
-->
</SCRIPT>

An example of using the AssociationListTableService that uses a subclass of BaseQueryService and presents the results is :

<SCRIPT LANGUAGE=Windchill>
<!--
tableService action=initAssociationNavigation BASEQUERYSERVICE=RelevantChangeables ROLE=theChangeable2 LINKCLASSNAME=wt.change2.RelevantAnalysisData OTHERSIDECLASS=wt.change2.Changeable2
tableService action=setAssociationTable ASSOCIATIONTABLE=wt.change2.htmlclient.ChangeableAssociationTable
tableService action=initAssociationTable OtherSideAttributes=number,name,versionInfo,type,source
tableService action=setHeaderAttributes COLUMNNUMBER=ALL th.ALIGN=left font.COLOR=white font.size=2
tableService action=setColumnAttributes COLUMNNUMBER=ALL td.ALIGN=left nowrap font.size=2
tableService action=setTableAttributes table.ALIGN=left table.WIDTH=90% table.cellspacing=2 table.cellpadding=2
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

  • Method Details

    • performAction

      public void performAction(Properties props, Locale locale, OutputStream os) throws WTException
      Deprecated.
      Performs the action defined by the value of the key AssociationListTableService.ACTION in the props parameter.

      If either props == null or there is not a value for AssociationListTableService.ACTION, an exception is thrown.

      The list of valid actions are

      • INITASSOCIATIONTABLE
      • INITASSOCIATIONNAVIGATION
      • SETASSOCIATIONTABLEMODEL
      • SETASSOCIATIONTABLE
      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
    • initAssociationTable

      public void initAssociationTable(Properties props, Locale locale, OutputStream os) throws WTException
      Deprecated.
      Initializes the AssociationTableModel that will drive the table by using the results of the navigation done in initAssociationNavigation and initializing the AssociationTableModel based on the settings of the navigation and the results of the navigation

      The Basic format of the Windchill script call is

      tableService action=initAssociationTable othersideattributes=<Comma separated list of attributes/column handles> linkattributes=<Comma separated list of attributes/column handles>

      The following name/value pairs can be set in the props parameter.

      • LINKATTRIBUTES - comma separated list of names/handles for the BinaryLink columns
      • OTHERSIDEATTRIBUTES - comma separated list of names/handles for the OtherSide object columns
      • USECHECKBOXTABLE - true/false indicating whether to have the first column be a checkbox column
      • NO_RESULTS_MESSAGE_KEY - Name of the Static String in a the Resoucre Bundle passed in NO_RESULTS_MESSAGE_RESOURCE
      • NO_RESULTS_MESSAGE_RESOURCE - Name of the Resource Bundle to use with the NO_RESULTS_MESSAGE_KEY
      It is assumed by the AssociationTableModel that the comma separated list of names/handles is a list of attributes for either the BinaryLink objects ( LINKATTRIBUTES ) or the OtherSide objects ( OTHERSIDEATTRIBUTES ). The names/handles do not have to attribute on those classes.

      Supported API: true
      Parameters:
      props -
      locale -
      os -
      Throws:
      WTException
    • initAssociationNavigation

      public void initAssociationNavigation(Properties props, Locale locale, OutputStream os) throws WTException
      Deprecated.
      Performs an association navigation based on the values passed in the props parameter.

      The Basic format of the Windchill script call is

      tableService action=initAssociationNavigation ROLE=<...> LINKCLASSNAME=<...> OTHERSIDECLASS=<...>

      The following name/value pairs MUST be set in the props parameter or an exception will occur

      • "ROLE" - The Role of the OtherSide object class
      • "LINKCLASSNAME" - The fully qualified class name of the BinaryLinks used to navigate
      • "OTHERSIDECLASS" - The fully qualified class name of the OtherSide objects in the BinaryLinks

      Some optional parameters that can be passed in are

      • "BASEQUERYSERVICE" - This can be the fully qualified class name of subclass of wt.enterprise.tabularresults.BaseQueryService or simply the name of the class(if the subclass is code generated)
      • "USEMASTER" - Use the Master of the current Context Object in performing the navigation

      The results of the navigation are passed to the initNavigationTable method to initialize the the AssociationTableModel.

      Supported API: true

      Parameters:
      props -
      locale -
      os -
      Throws:
      WTException
    • setAssociationTableModel

      public void setAssociationTableModel(Properties props, Locale locale, OutputStream os) throws WTException
      Deprecated.
      Sets the AssociationTableModel subclass to use.

      The value of the "ASSOCIATIONTABLEMODEL" key in the props parameter must be the fully qualified class name of a subclass of AssociationTableModel (or AssociationTableModel itself) otherwise an exception will be thrown.

      Supported API: true

      Parameters:
      props -
      locale -
      os -
      Throws:
      WTException
    • setAssociationTable

      public void setAssociationTable(Properties props, Locale locale, OutputStream os) throws WTException
      Deprecated.
      Sets the WTHtmlTable subclass to use.

      The value of the "ASSOCIATIONTABLE" key in the props parameter must be the fully qualified class name of a subclass of WTHtmlTable (or WTHtmlTable itself) otherwise an exception will be thrown.

      Supported API: true

      Parameters:
      props -
      locale -
      os -
      Throws:
      WTException
    • setAssociationTableModel

      public void setAssociationTableModel(AssociationTableModel newAssociationTableModel)
      Deprecated.
      Sets the subclass of AssociationTableModel to be used in generating the Table.

      Supported API: true
      Parameters:
      AssociationTableModel -
    • setAssociationTable

      public void setAssociationTable(HTMLTable newAssociationTable)
      Deprecated.
      Sets the current HTMLTable subclass. This is actually required to be a subclass of WTHtmlTable

      Supported API: true
      Parameters:
      newAssociationTable -