See https://issues.apache.org/jira/browse/TOMAHAWK-523 for problem and work-around.
Cheers, Ian. > -----Original Message----- > From: Ian.Priest [mailto:[EMAIL PROTECTED] > Sent: 26 January 2007 15:30 > To: [email protected] > Subject: setting rowStyleClass > > Hi, > > > > I seem to have an error when setting the rowStyleClass attribute of a > table. I'm trying to set the row class dynamically so I can have > certain > rows highlighted based on a bean variable. Here's my widget, which > extends MyFaces Tomahawk DataTable: > > > > <component jsfid="callHistoryTable" extends="t:dataTable" > allowBody="false"> > > <attributes> > > <set name="value" > value="[EMAIL PROTECTED]" /> > > <set name="var" value="call" /> > > ... > > <set name="rowStyleClass" value="#{call.cost eq 0 ? > 'freecalls' : 'chargedcalls'}" /> > > </attributes> > > > > <element renderId="0" jsfid="dateTimeColumn" /> > > <element renderId="1" jsfid="callerIdColumn" /> > > <element renderId="2" jsfid="numberCalledColumn" /> > > <element renderId="4" jsfid="durationColumn" /> > > <element renderId="5" jsfid="moneyCostColumn" /> > > </component> > > > > But no class at all is set in the rendered table. Viewing page source > of the final page gives: > > > > ... > > <tr><td>...</td></tr> > > ... > > > > If I try to set a rowStyleClass in my html as follows (I also remove > the > ref to rowStyleClass in the widget): > > > > <table jsfid="callHistoryTable" rowStyleClass="freecalls"> > > > > All I get is an empty class declaration in my <tr> tag: > > > > <tr class=""><td>... > > Has anyone managed to get this working? > > > > Cheers, > > Ian. > >
