Q:

How to style a row in rich:datatable acording to the row value or index?

I have a rich:datatable like so:
<rich:dataTable var="scheduledTimeItem" 
value="#{itineraryBean.weekDaysScheduledTimes}">
    <rich:column style="text-align: center;">
        <h:outputText>#{scheduledTimeItem.formattedStartTime}   </h:outputText>
    </rich:column>
</rich:datatable>

And I would like to, for example, put background-color: red in the style of that row if the value of scheduledTimeItem.formattedStartTime is greater than 17:00h or the current time for example.
How do I send the value of the row or its index to the bean at the time that is rendered?

A:

You could do something like this
<h:outputText styleClass="#{scheduledTimeItem.style}">#{scheduledTimeItem.formattedStartTime}   </h:outputText>

for every column.

