Basic Customization > User Interface Customization > Presenting Information in the UI > Constructing and Rendering a Table Using the JSP Framework > Customization Points > Configuring Strikethrough Feature
  
Configuring Strikethrough Feature
JCA Table component has ability to "redline" individual rows.
The following configuration points are available for specifying which row(s) will be struckthrough.
Configuring strikethrough on a hidden column
Add dataStoreOnly column with id "strikeThroughRow". Provide need attribute for boolean column.
An example:
ColumnConfig strikeThroughColumn = factory.newColumnConfig("strikeThroughRow",
false);
strikeThroughColumn.setDataStoreOnly(true);
strikeThroughColumn.setNeed("someColumnId");
Configuring strikethrough on a row value
A new datautility that extends AbstractBooleanValueDataUtility should be defined for the column.
The only abstract method getBooleanAttributeValue() should be defined to return a Boolean. Custom code can be written to determine the returning Boolean. The Boolean will decide if the row should be strikethroughed or not.
An example:
Column defined in builder to be added to JcaTableConfig:
ColumnConfig col = factory.newColumnConfig("myCol", false);
Corresponding mapping of the datautility for the column:
<Service name="com.ptc.core.components.descriptor.DataUtility">
<Option serviceClass="com.ptc.windchill.enterprise.myModule.dataUtilities
.MyStrikeThroughRowDataUtility" requestor="java.lang.Object"
selector="myCol" cardinality="duplicate"/>
</Service>
New datautility class:
public class MyStrikeThroughRowDataUtility extends AbstractBooleanValueDataUtility {
public boolean getBooleanAttributeValue (String component_id, Object datum, ModelContext mc) throws WTException {
/* some logic to return Boolean value*/
}
}
Configuring already present Boolean column as a strikethrough column
The Boolean value column can be set as the strikethrough column in the table builder. So the value of this column can be used to determine if the row will be strikethrough.
An example:
TableConfig tableconfig = factory.newTableConfig(‘myTable’);
ColumnConfig aBooleanColumn = factory.newColumnConfig("aBooleanColumn", false);
Tableconfig.setRowStrikeThroughColumn(aBooleanColumn);