Basic Customization > User Interface Customization > Presenting Information in the UI > Constructing and Rendering a Table Using the JSP Framework > Customization Points > Configuring non- Pre-Selection rows > Configuring Pre selectable rows based on a boolean attribute value available in the backing object
  
Configuring Pre selectable rows based on a boolean attribute value available in the backing object
The com.ptc.core.components.factory.dataUtilities. DefaultBooleanValueDataUtility is out of box datautility provided for this case. This will simply return the value of the given column. There are two ways to set this data utility for a column in a table:
Use PRE_SELECTABLE_COL as the column Id
Create a column with an Id as “com.ptc.core.components.descriptor.DescriptorConstants.ColumnIdentifiers.PRE_SELECTABLE_COLUMN” (against this the dataUtility has been registered) and set the attribute as the need.”.
An example:
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);
Setting datautility Id to PRE_SELECTABLE_COLUMN
Create a column with any Id, set the attribute as the need and set the Datautility Id as “com.ptc.core.components.descriptor.DescriptorConstants.ColumnIdentifiers.PRE_SELECTABLE_COLUMN”..
An example:
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);