I’m new to jsf and I can’t solve this issue.
I have an OutputText inside a rich:dataTable. I want to change the color of this OutputText according to its value (these values are integer). For example, if value is >= 50 then color is red, else color is white.
Thanks in advance.
I’m new to jsf and I can’t solve this issue. I have an OutputText
Share
It’s easily done with css, for example:
where classes red and white are defined accordingly or directly with style attribute:
and even simpler markup when color/class is calculated in Java:
or in a custom EL function: