Reputation: 493
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?
Upvotes: 0
Views: 1137
Reputation: 4914
You could do something like this
<h:outputText styleClass="#{scheduledTimeItem.style}">#{scheduledTimeItem.formattedStartTime} </h:outputText>
for every column.
Upvotes: 1