Try binding the dataTable element to a component instance :

<h:dataTable binding="#{b.b1}" />

... where b1 is a property for a HtmlDataTable .

Then, before the page is rendered, call HtmlDataTable.setRowClasses() .

Dennis Byrne

>-----Original Message-----
>From: Henrik Bentel [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, January 25, 2006 07:42 PM
>To: [email protected]
>Subject: dataTable and dynamic rowClasses
>
>Hi
>
>I'm looking for a way to dynamically set the style of each
>row in a dataTable. I know how to do it statically using rowClasses
>with a comma delimited string.
>
>I'm using the tomahawk dataTable and I've tried to
>change the "rowClasses" property to an expression like so:
>#{MyBackingBean.rowClass}
>but that property is only resolved once when the table component is rendered.
>
>What I'm looking for is a way to set the style of the current row
>being rendered  based on the state of the current element (current
>"var").
>Is this possible?
>
>thanks
>-Henrik
>


Reply via email to