Code: Select all
<p:dataTable dynamic="true" value="#{ListBean.list.contacts}" var="contact" rows="30" paginator="true" rowIndexVar="row" rowStyleClass="#{row % 2 == 0 ? 'tteven' : 'ttodd'}">
...
</p:dataTable>
Code: Select all
<p:dataTable dynamic="true" value="#{ListBean.list.contacts}" var="contact" rows="30" paginator="true" rowIndexVar="row" rowStyleClass="#{row % 2 == 0 ? 'tteven' : 'ttodd'}">
...
</p:dataTable>
Code: Select all
<p:dataTable dynamic="true" value="#{ListBean.list.contacts}" var="contact" rows="30" paginator="true" rowIndexVar="row" rowStyleClass="#{(row == null || row % 2 != 0) ? 'tteven' : 'ttodd'}">
...
</p:dataTable>
Code: Select all
<p:column>
<f:facet name="header">rowIndexVar</f:facet>
<h:outputText value="#{row}"/>
</p:column>
Code: Select all
<p:column>
<f:facet name="header">rowIndexVar</f:facet>
<h:outputText value="#{row}"/>
</p:column>
Code: Select all
<p:column>
<f:facet name="header">rowIndexVar</f:facet>
<h:outputText value="#{row % 2 == 0}"/>
</p:column>
Users browsing this forum: No registered users and 37 guests