How to conditionally style a row in a rich:dataTable

Luca Molteni picture Luca Molteni · Jun 8, 2009 · Viewed 49.2k times · Source

How can I change the style of a particular row based on a condition? I can use JSF EL in rich:column style class attribute, but I have to write for each column. I want to change the entire row.

Thanks

Answer

Gene picture Gene · Sep 9, 2009

Specifically for each column:

<rich:column styleClass="#{someBean.isSomething ? 'styleIfTrue' : 'styleIfFalse' }">