基本的なカスタマイズ > ユーザーインタフェースのカスタマイズ > Windchill JSP フレームワークを使用した HTML クライアントのカスタマイズ > 属性パネル > サンプルコード > TypeInstance データムオブジェクトの取得
  
TypeInstance データムオブジェクトの取得
オブジェクト作成または編集ウィザードのパネルの場合、一般に TypeInstance データムオブジェクトを返して、属性に定義されている制約にデータユーティリティからアクセスできるようにする必要があります。このコードは、ビルダーの buildComponentData() メソッド内で、CreateAndEditModelGetter.getItemAttributes() メソッドを使って TypeInstance を取得する方法を示しています。buildComponentData() メソッドを使う場合、initializeItem タグを使ってウィザードのコンテキスト内でパネルを表示する必要があります。
JcaComponentParams jcaParams = (JcaComponentParams) params;
ComponentDescriptor cdesc = jcaParams.getDescriptor();
NmCommandBean commandBean =
jcaParams.getHelperBean().getNmCommandBean();
NmContext nmContext =
jcaParams.getHelperBean().getNmContextBean().getContext();
ArrayList typeInstances =
CreateAndEditModelGetter.getItemAttributes
(cdesc, commandBean, nmContext);