Details
Description
I tried setting different column styles using solution proposed by MindBridge.
I have the following in my .page file:
<component id="tableValues" type="contrib:TableValues">
<binding name="column" value="currColumn"/>
<binding name="class" value="currColumnClass"/>
</component>
The problem is that although the currColumn gets correctly initialized with every column, the "getCurrColumnClass" method gets called just once, only for the first column, so every <td> tag gets the same "class"!
The solution works with Tapestry 3.0, so I have modified the following method of TableValues (copied from version 3.0):
public String getValueClass()
{ IBinding objClassBinding = getBinding("class"); if (objClassBinding != null) return objClassBinding.getObject().toString(); else return getTableColumn().getColumnName() + TABLE_VALUE_CSS_CLASS_SUFFIX; // if (isParameterBound("class")) // return getCellClass(); // // return getTableColumn().getColumnName() + TABLE_VALUE_CSS_CLASS_SUFFIX; }This way it works for me.