其他 Windchill 功能 > 製造流程管理 > 自訂產品結構總管 (PSE) > 在區段標題內自訂屬性顯示
  
在區段標題內自訂屬性顯示
您可以自訂 SectionHeading 標籤來控制屬性的顯示。本節包含下列主題:
自訂群組內屬性的顯示
展開/摺疊顯示群組
自訂顯示的欄數
自訂群組內屬性的顯示
SectionHeading 元素中有可供您編輯屬性群組詳細資訊的子句。您可使用此子句在顯示畫面的面板中隱藏或顯示特定屬性,例如「建立零件精靈」、「插入現有零件精靈」或「資訊標籤」。
在下列範例程式碼中,"allowAttrDetails = true" 子句已新增至「插入現有零件精靈」所用的 CreateChildPartTab2 屬性群組的 SectionHeading 元素中。
範例程式碼:
<AttributeGroup id="ptc.wnc.exp.CreateChildPartTab2"
scrollable="true" displayMode="edit">
<SectionHeading allowAttrDetails="true">
<Label>
<Resource key="Properties Top"/>
</Label>
</SectionHeading>
<CellDefinition id="name">
<AttributeDefinition attributeId="name"/>
</CellDefinition>
<CellDefinition id="number">
<AttributeDefinition attributeId="number"
rendererClass="com.ptc.windchill.explorer.structureexplorer.render
er.component.PartNumberComponent"/>
</CellDefinition>
<SectionHeading allowAttrDetails="true">
<Label>
<Resource key="Properties 1"/>
</Label>
</SectionHeading>
<CellDefinition id="view">
<AttributeDefinition attributeId="view"
rendererClass="com.ptc.windchill.explorer.structureexplorer.render
er.component.ViewComponent"/>
</CellDefinition>
<CellDefinition id="folder">
<AttributeDefinition attributeId="folder"
rendererClass="com.ptc.windchill.explorer.structureexplorer.render
er.component.DefaultcontextFolderBrowserComponent"/>
</CellDefinition>
<CellDefinition id="source">
<AttributeDefinition attributeId="source"/>
</CellDefinition>
<CellDefinition id="partType">
<AttributeDefinition attributeId="partType"/>
</CellDefinition>
<SectionHeading allowAttrDetails="true">
<Label>
<Resource key="Properties 2"/>
</Label>
</SectionHeading>
<CellDefinition id="usedQuantityAmount">
<AttributeDefinition attributeId="usedQuantityAmount"/>
</CellDefinition>
<CellDefinition id="usedQuantityUnit">
<AttributeDefinition attributeId="usedQuantityUnit"/>
</CellDefinition>
<CellDefinition id="usedTraceCode">
<AttributeDefinition attributeId="usedTraceCode"/>
</CellDefinition>
<CellDefinition id="effPropagationStop">
<AttributeDefinition attributeId="effPropagationStop"/>
</CellDefinition>
<CellDefinition id="jobAuthorizationNumber">
<AttributeDefinition
attributeId="jobAuthorizationNumber"/>
<EnabledDependency inverted="false">
<Assembly assembly="wadm"/>
</EnabledDependency>
</CellDefinition>
<CellDefinition id="contractNumber">
<AttributeDefinition attributeId="contractNumber"/>
<EnabledDependency inverted="false">
<Assembly assembly="wadm"/>
</EnabledDependency>
</CellDefinition>
<CellDefinition id="phase">
<AttributeDefinition attributeId="phase"/>
<EnabledDependency inverted="false">
<Assembly assembly="wadm"/>
</EnabledDependency>
</CellDefinition>
</AttributeGroup>
新增 "allowAttrDetails=true" 子句後,會在 UI 中產生下列輸出。
新增 SectionHeading 會在 SectionHeading 後的屬性群組周圍建立一個方塊。
SectionHeading 的 Label 子句會提供方塊文字。
AllowAttrDetails ="true" 子句可啟用「詳細資訊」圖示,使其顯示在標籤之後,也可啟用面板的快顯選單。
這是您按一下標籤後的「詳細資訊」圖示之後所顯示的「詳細資訊」對話方塊。使用者可以隱藏或顯示個別屬性,但不能變更屬性的順序。
例如,使用者可以選擇隱藏「屬性 1」部份內的「位置」屬性。現已另存為此使用者的偏好設定,並在下一次使用者載入 PSE 之前,一直保持此狀態。
展開/摺疊顯示群組
若單一標籤上或精靈內的某一步驟中顯示多個群組,這可能會導致畫面內容捲動。這對使用者來說可能會造成困擾,特別是使用者只是想要輸入最少數量的屬性時。您可以自訂「標題」,以允許使用者展開/摺疊所顯示的屬性集。從一個工作階段轉到另一個工作階段時,系統會記住此設定。
這是 UI 可能外觀的範例。「責任」群組會摺疊,因此 "+" 圖示可用於展開該群組。「生產資料」群組會展開,因此 "-" 圖示可用於摺疊該群組。
範例程式碼:
<AttributeGroup id="ptc.wnc.exp.CreateChild" displayMode="edit">
<SectionHeading id="ptc.wnc.exp.CreateChild.Responsibilities"
allowAttrDetails="true" allowCollapsable="true">
<Label>
<Resource key="responsibilitiesSectionLabel"/>
</Label>
</SectionHeading>
… cell definitions for the group here…
</AttributeGroup>
自訂顯示的欄數
您可以自訂 SectionHeading 標籤內顯示的欄數。您可以建立類似以下範例的配置圖。
若您在某屬性群組之前指定 SectionHeading,則這些屬性會被一個邊界框圍住,並附帶由 <Label> 標籤指定的標題。如需有關 <Label> 標籤的詳細資訊,請參閱自訂群組內屬性的顯示
如果 numberOfColumns 設定為 "1",將會顯示單一屬性欄;如果設定為 "2",將會顯示 2 個屬性欄。
在上面的範例螢幕擷取畫面中,URL0: 是具有兩個輸入欄位的單一屬性。請注意,如果某部份中的任何屬性均為必要,邊界上的標籤也會被標記為必要。
範例程式碼:
<AttributeGroup id="ptc.wnc.exp.CreatePartTab4"
scrollable="true" displayMode="edit">
<SectionHeading numberOfColumns="1">
<Label>
<Resource key="checkoutInfoStateLabel"/>
</Label>
</SectionHeading>
<CellDefinition id="String0">
<AttributeDefinition attributeId="IBA|String0"/>
</CellDefinition>
<CellDefinition id="URL0">
<AttributeDefinition attributeId="IBA|URL0"/>
</CellDefinition>
<SectionHeading numberOfColumns="2">
<Label>
<Resource key="serialNumberValueLabel"/>
</Label>
</SectionHeading>
<CellDefinition id="Boolean0">
<AttributeDefinition attributeId="IBA|Boolean0"
required="true"/>
</CellDefinition>
<CellDefinition id="Integer0">
<AttributeDefinition attributeId="IBA|Integer0"
required="true"/>
</CellDefinition>
<CellDefinition id="Real0">
<AttributeDefinition attributeId="IBA|Real0"/>
</CellDefinition>
<CellDefinition id="DateTime0">
<AttributeDefinition attributeId="IBA|DateTime0"/>
</CellDefinition>
</AttributeGroup>