How can I change the textcolor within a column by condition? eg
“>=0 : green”
“<0 : red”
?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Something like this should do the trick:
h:outputText value=”something” style=”#{someProperty >= 0 ? ‘color: green’ : ‘color: red’}” />
In other words just make the condition in the el expression for the style. That’s one way of doing it anyway.