I am trying to add custom coloring in a data table in PF 2.2.1:
xhtml:
<p:dataTable style="width: 100%;" id="dTable" var="tt" value="#{aList}" paginator="true" rows="15"
selection="#{selected}" selectionMode="single"
onRowSelectUpdate="mf:tabcontent"
rowStyleClass="#{tt.state.intValue() le 2 ? 'waiting' : null}"
POJO:
private Byte state;
css:
.waiting{
background-image: none !important;
color: black !important;
}
I cleared the cache of the browser, refresh the page several times but still no good. What is wrong with the above code?
Don’t you want to color the background of the cell?
try adding
background-colorattribute as well, like thiscomplete :