Customizing PSE Table Display
Objective
You wish to change the default display order of columns in a PSE table, whether a specific column is mandatory or optional, or whether a column is frozen.
Background
With Windchill PDMLink PSE now provides the capability for users to customize the display of columns in tables. For example the Column Details for the Uses tab.
However, what a user can do is controlled within the bounds set in the PSE XML files that define the columns in each table.
Scope/Applicability/Assumptions
As these changes are being made to the PSE XML files, they will apply to all users of PSE.
Intended Outcome
The default display is that Number is a frozen mandatory column that is frozen (so it does not scroll) in the Uses tab. Lets consider that we wish that Name is a mandatory attribute to display, that it and Reference Designator Range are frozen columns, Number is not frozen and is displayed though optional, Line Number is available but not displayed. As Number is optional, it is removed from the tabular input search.
The following figure shows how the PSE User Interface appears.
Solution
The CellDefinition element used in the PSE XML files has a number of attributes that control the display of columns in a table and dictate to what extent a user can change the table’s appearance and behavior.
Attribute | Description |
mandatory | If mandatory, the user may not hide the column |
displayWhenNoPreferenceSet | Whether the column will be displayed, if it is not mandatory |
pinnable | Whether the column may be frozen by the user |
pinned | Whether the column appears frozen by default |
usedByTabularInput | In Draft and Annotate modes specifies if the cell will be used in Data Entry search. |
Many of the PSE Tables including the Uses Tab Table are defined in the file
<Windchill>/codebase/config/logicrepository/xml/explorer/structureexplorer/Expl
orerForTablesAndPanels.xml
Prerequisite knowledge
To achieve this objective, you need to have an understanding of the following:
• Management of XML file customizations
Solution Elements
Element | Type | Description |
ExplorerForTablesA ndPa nels.xml | XML file | Holds the definition of the tables and panels. Located in: <Windchill>/codebase/config/logicreposi tory/xml/structureexplore |
Table | XML element | Defined the table and contents |
CellDefinition | XML element | The attribute with its appropriate behavior to be displayed in the AttributeTable. |
Procedure
The Table id ptc.wnc.exp.PartUsesLinkTabTable in the file:
<Windchill>/codebase/config/logicrepository/xml/explorer/structureexplorer/Explorer ForTablesAndPanels.xml
is used to show the Uses Table BOM, when showing occurrences ptc.wnc.exp.PartUsesOccTabTable is used.
By changing the order of the CellDefinitions for the Table, and specifying appropriate values for mandatory, displayWhen NoPreferenceSet, pinnable, pinned and usedByTabularInput, the desired table can be formed.
<Table id="ptc.wnc.exp.PartUsesLinkTabTable"
selectionMode="multi-non-contiguous" displayMode="view">
<CellDefinition id="name" pinned="true" mandatory="true"
usedByTabularInput="true" displayModeOverride="edit">
<AttributeDefinition attributeId="name">
<Import id="ptc.wnc.exp.SurfaceAttrAction"/>
</AttributeDefinition>
</CellDefinition>
<CellDefinition id="referenceDesignatorRange"
pinned="true" mandatory="false" displayModeOverride="edit">
<Label>
<Resource key="referenceDesignatorRangeLabel"/>
</Label>
<AttributeDefinition
attributeId="referenceDesignatorRange">
<Import id="ptc.wnc.exp.RefDesRangeAttrAction"/>
</AttributeDefinition>
</CellDefinition>
<CellDefinition id="number" pinned="false"
mandatory="false" displayWhenNoPreferenceSet="true"
usedByTabularInput="false" displayModeOverride="edit">
<AttributeDefinition attributeId="number">
<Import id="ptc.wnc.exp.SurfaceAttrAction"/>
</AttributeDefinition>
</CellDefinition>
<CellDefinition id="usedLineNumber" pinned="false"
mandatory="false" displayWhenNoPreferenceSet="false"
displayModeOverride="edit">
<Label>
<Resource key="lineNumberLabel"/>
</Label>
<AttributeDefinition attributeId="usedLineNumber"
rendererClass="com.ptc.windchill.explorer.structureexplorer.render
er.component.LineNumberComponent">
<Import id="ptc.wnc.exp.LineNumberAttrAction"/>
</AttributeDefinition>
</CellDefinition>
After this change has been made, the method server has to be re-started. The client UI may still not appear correct, this is because a user preference is used to hold the current table layout. To clear this use the > action and reset the column/window layout preferences. When PSE is restarted, the Uses tab table appears as shown in the Intended Outcome section.
Customization Points
The definition of the PSE Structure with id “ptc.pdm.pse.ExplorerTreeTable” is to be found in:
<Windchill>/codebase\config\logicrepository\xml\explorer\productstructure\PDMLink
ExplorerForTablesAndPanels.xml
Also, if Windchill Supplier Management is installed, its tables are defined in:
<Windchill>/codebase\config\logicrepository\xml\explorer\productstructure\Explorer
ForTablesAndPanelsForSUMA.xml