I have a string which can be yes or no, instantiated in an object in a Java backing bean. I can\'t seem to find the best way to conditionally style the text red or green depend
(in order of preference):
style="color: #{yourVar == 'yes' ? 'green' : 'red'};"<h:outputText> components with different styles, each with a different rendered attribute (one #{yourVar == 'yes'} and the other #{yourVar == 'no'})styleClass="#{my:getStyleClass(yourVar)}"