I use PrimeFaces 2.2 RC2 and I am trying to make conditional coloring on the Items of a Carousel Component, like the one made with a DataTable in the example: http://www.primefaces.org/showcase/ui/d ... loring.jsf. But, instead of using rowStyleClass, I am using itemStyleClass.
However, it is not working.
Here is a fragment of my code:
Code: Select all
<p:carousel rows="10" scrollIncrement="9" itemStyleClass="#{ empty rowIx or rowIx mod 2 ne 0 ? 'even-row' : 'odd-row' }" widgetVar="rowIx">
<!-- Some tabs inside -->
</p:carousel>
Code: Select all
.even-row {
background-color: silver;
}
.odd-row {
background-color: green !important;
}
Is it possible to do this kind of conditional coloring in a Carousel. If so, which attribute do I have to use to identify each of the items of the Carousel.
I would really appreciate if someone could help me with this issue.
Thank you a lot in advance.
Alex