How to color the rows of HTMLdatatable based on the condition in JSF 1.0?
+2
A:
Pass a commaseparated string of CSS class names to the rowClasses
attribute of the component. Those CSS class names will be applied on the rows repeatedly. And then of course define the color in those CSS class(es).
BalusC
2010-06-25 12:17:49
but i want to color the row through managebean according to some condition for example it the value of one filed is "I" the color should be gray,value is "M" then color should be white else if the value is "A" then color should be pink. so according to you the color is which I define in rowclasses is fixed for whole table.
shachindra singh
2010-06-28 04:30:22
You can just use EL. E.g. `rowClasses="#{bean.rowClasses}"`.
BalusC
2010-06-28 11:03:49