lamostreta
lamostreta

Reputation: 2409

Datatable Custom Coloring

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?

Upvotes: 1

Views: 1268

Answers (1)

Daniel
Daniel

Reputation: 37071

Don't you want to color the background of the cell?

try adding background-color attribute as well, like this

    background-color: #6CE26C !important;

complete :

.waiting{
    background-color: #6CE26C !important;
    background-image: none !important;
    color: black !important;
}

Upvotes: 4

Related Questions