基本的なカスタマイズ > ユーザーインタフェースのカスタマイズ > UI の情報の表示 > 属性テーブル > サンプルコード > attributesTableComponent の実装の例
  
attributesTableComponent の実装の例
ここでは、いくつかのオブジェクトタイプについて属性テーブルを設定する例を示します。ただし、これらの手順ではコードベースの場所のみを示し、ソースの配置の手順や、xconf ファイルへの情報の入力、xconf ファイルでのコンテンツの構築、xconf ファイルへの入力などの最良事例は含まれていません。作業を開始するための概念のみを説明します。
1. attributes.jsp という名前の JSP ファイルを作成し、コードベースの以下の場所に配置します。
codebase/netmarkets/jsp/part/
ここで、以下のコンテンツをページに追加します。
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.ptc.com/windchill/taglib/components"
prefix="jca"%>
<jca:describeAttributesTable var="attributesTableDescriptor"
mode="VIEW" id="view.setAttribute"
label="Attributes" scope="request">
<jca:describeProperty id="containerName" />
<jca:describeProperty id="name"/>
<jca:describeProperty id="number"/>
<jca:describeProperty id="creatorName" />
<jca:describeProperty id="currentPrincipal" />
<jca:describeProperty id="cabinet"/>
<jca:describeProperty id="cabinetName"/>
<jca:describeProperty id="checkoutInfo.state" />
<jca:describeProperty id="comment"/>
<jca:describeProperty id="displayIdentifier"/>
<jca:describeProperty id="endItem"/>
<jca:describeProperty id="folderName"/>
<jca:describeProperty id="lifeCycleName" />
<jca:describeProperty id="usedBy"/>
<jca:describeProperty id="version"/>
<jca:describeProperty id="view" />
<jca:describeProperty id="viewName"/>
<jca:describeProperty id="owner.id"/>
<jca:describeProperty id="ALL_SOFT_SCHEMA_ATTRIBUTES"/>*
</jca:describeAttributesTable>
また、以下の手順で編集操作を開始できます。最初に表示するステップは、以下のフォーマットのリクエストで設定できます。
startStep=<step id>
* "ALL_SOFT_SCHEMA_ATTRIBUTES" はすべてのソフト属性とその値を表示します。
2. 情報ページサーブレットが JSP への転送を認識するように JSP を登録します。
以下のエントリを codebase/typedservices.properties に追加します。
wt.services/rsc/default/com.ptc.netmarkets.util.misc.FilePathFa
ctory/Attributes/wt.part.WTPart/0=/netmarkets/jsp/part/attribut
es.jsp
3. 新しい JSP をテストします。「ホーム」ページまたは「フォルダ」ページのアイコンは、新しい情報ページサーブレットにリンクする必要があります。URL は以下のようになります。
http://<machine>/<WindchillAppName>/servlet/InfoPage?oid=OR:wt.
part.WTPart:62028
サーブレットは typedservices.properties で転送先の JSP を検索します。属性テーブルの第 3 レベルナビゲーションに属性名とその値のリストが表示されます。