Hi all,
I have a bean of array. A datatable is created out of this bean. I want to be able to colo rox-x in this datatable; row-x is colored based on some business logic. How do I do that?
Example:
<h
ataTable id="table1" value="#{pc_EcOutput.tableDataMrgBean.errors}" var="varerrors">
<h:column id="column1">
<f:facet name="header">
<h
utputText styleClass="outputText" value="Item Number" id="text3"> </h
utputText>
</f:facet>
<h
utputText id="text4" styleClass="outputText" value="#{varerrors.errItem}"></h
utputText>
// if (varerrors.errItem == "E1")
// styleClass="red"
//else if(varerrors.errItem == "W1")
// styleClass ="blue"
//else
//styleClass="grey"
</h:column>
-
-
-
I have tried using a wrapper class which uses those if statement above to return a particular styleClass for each errItem. Unfortunately I can't pin point the row (or row index) that contains E1 or W1 to color. It turns out coloring the whole table w/ red or blue or grey.... Can someone show me how this work please....?
Thank you for your time and assistance..