formatting tables: dynamic row highlighting

View: New views
2 Messages — Rating Filter:   Alert me  

formatting tables: dynamic row highlighting

by Louis Polycarpou :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What is the best way to format a row (i.e. row highlighting) when a particular field value is present in a table column for that row?

For example, I want to highlight all the rows in the table shown where Status = 'Not Started'.  Status is a databound value.



Thanks,
Louis


Re: formatting tables: dynamic row highlighting

by Dan Labrecque :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Using the styleClasses attribute of tableRowGroup, set a value expression. As the table iterates over each row, your backing bean method will be called and you may return the appropriate value.

Dan

Louis Polycarpou wrote:
What is the best way to format a row (i.e. row highlighting) when a particular field value is present in a table column for that row?

For example, I want to highlight all the rows in the table shown where Status = 'Not Started'.  Status is a databound value.



Thanks,
Louis