基本的なカスタマイズ > ユーザーインタフェースのカスタマイズ > UI の情報の表示 > JSP フレームワークを使用したテーブルの構築とレンダリング > カスタマイズポイント > 非事前選択行の設定 > バッキングオブジェクトで使用可能なブール属性の値に基づいた事前選択可能な行の設定
  
バッキングオブジェクトで使用可能なブール属性の値に基づいた事前選択可能な行の設定
com.ptc.core.components.factory.dataUtilities.DefaultBooleanValueDataUtility はこのために事前に用意されているデータユーティリティです。これは指定された列の値を返す単純なユーティリティです。テーブルの列にこのデータユーティリティを設定する方法は 2 とおりあります。
列 ID として PRE_SELECTABLE_COL を使用する
ID が "com.ptc.core.components.descriptor.DescriptorConstants.ColumnIdentifiers.PRE_SELECTABLE_COLUMN" の列を作成し (これに対してデータユーティリティが登録されています) 必要に応じて属性を設定します。
TableConfig table = factory.newTableConfig ();
---------
ColumnConfig col = factory.newColumnConfig (PRE_SELECTABLE_COLUMN, false);
col.setNeed (<Attribute>); // Specify the attribute which will decide the row is pre-selectable or not.
col.setDataStoreOnly (true);// this will make your column available on store only
table.addComponent (col);
table.setPreSelectableColumn (col);
データユーティリティ ID を PRE_SELECTABLE_COLUMN に設定する
任意の ID で列を作成し、必要に応じて属性を設定し、データユーティリティ ID を "com.ptc.core.components.descriptor.DescriptorConstants.ColumnIdentifiers.PRE_SELECTABLE_COLUMN" に設定します。
TableConfig table = factory.newTableConfig ();
--------
ColumnConfig col = factory.newColumnConfig(<columnId>, false);
col.setNeed (<Attribute>);
// Specify the attribute which will decide the row
is selectable or not.
((JcaColumnConfig)col)setDataUtilityId (PRE_SELECTABLE_COLUMN);
col.setDataStoreOnly (true); // this will make your Column hidden
table.addComponent (col);
table.setPreSelectableColumn (col);