OpenFaces
OpenFaces copied to clipboard
DataTablePaginator current page number not updated
When I put the data table paginator component, I noticed during going to the next page, the current page is still 1 and the go to previous page button is still disabled.
Here is the source code: ` <o:dataTable value="#{resultController.resultList}" var="result" styleClass="resultlisttable" pageSize="#{resultController.pageSize}"> <o:row condition="#{result.value >= result.test.minLimit && result.value <= result.test.maxLimit}" styleClass="resultlistok" /> <o:row condition="#{result.value <= result.test.minLimit || result.value >= result.test.maxLimit}" styleClass="resultlistfail" />
<f:facet name="above">
<o:dataTablePaginator />
</f:facet>
<f:facet name="below">
<o:dataTablePaginator />
</f:facet>
<o:column>
<f:facet name="header">#{msg [ 'result_test' ]}</f:facet>
<h:outputText value="#{result.test.name}"></h:outputText>
</o:column>
<o:column>
<f:facet name="header">#{msg [ 'result_value' ]}</f:facet>
<h:outputText value="#{result.value}">
<f:convertNumber maxFractionDigits="2"></f:convertNumber>
</h:outputText>
<h:outputText value=" #{result.test.unit.name}"></h:outputText>
</o:column>
<o:column>
<f:facet name="header">#{msg [ 'result_date' ]}</f:facet>
<h:outputText value="#{result.date}">
<f:convertDateTime pattern="MMMM dd, yyyy"></f:convertDateTime>
</h:outputText>
</o:column>
<o:column>
<f:facet name="header">#{msg [ 'action' ]}</f:facet>
<h:commandLink value="#{msg [ 'link_action_edit' ]}" action="#{resultController.edit(result.id)}" />
|
<h:commandLink value="#{msg [ 'link_action_delete' ]}" action="#{resultController.delete(result.id)}" />
</o:column>
</o:dataTable>
`