Search code examples
cssrichfaceszebra-striping

rich:datatable -- zebra striping with rowClasses attribute does not work!


I am trying to style a table with "zebra" coloured rows, however, for some reason, the rowClasses attribute does not seem to work (edit: I see no colours at all applied to the table).

I defined the style as follows:

<style>
.even-row {
   background-colour: #fcefa1;
}
.odd-row {
   background-colour: #f7f7f7;
}
</style>

And the dataTable itself looks like this:

<rich:dataTable value="#{bean.labels}" var="label" rowClasses="even-row, odd-row">  
    <rich:column>
        <h:outputText value="#{label}"/> 
    </rich:column>
</rich:dataTable>

Any idea as to why this might not be working? (Perhaps I misunderstand what the rowClasses attribute's role is)


Solution

  • The British Spelling of Doom ate a day of my life!

    Should be background-color instead of background-coloUr.