zafirov
zafirov

Reputation: 392

Primefaces Datatable coloring row

closedItem returns Boolean. I add this to dataTable

rowStyleClass="#{(res.closedItem) eq true ? 'Closed' : null}"

My CSS

<style type="text/css">
    .Closed
    {
        background-color: #6CE26C !important;
        background-image: none !important;
        color: #000000 !important;
    }
</style>

But it doesn't work, pls help.

Upvotes: 0

Views: 195

Answers (2)

chaeschuechli
chaeschuechli

Reputation: 160

Maybe you have the possibility to use the PrimeFaces framework?

http://www.primefaces.org/showcase/ui/data/datatable/rowColor.xhtml

Take a look at it, there are some very nice additional features

Upvotes: 0

Szarpul
Szarpul

Reputation: 1571

try:

rowStyleClass="#{res.closedItem ? 'Closed' : ''}"

Upvotes: 2

Related Questions