datatable paginator primefaces无效

时间:2014-06-09 11:34:09

标签: jsf primefaces datatable pagination

我试图将分页器包含在我的数据表中但是它没有工作,我有表和分页器显示但它不起作用,总是在第1页! 这是我的代码: ![datatable paginator not working] [1]

<h:form id="form">
                <p:outputPanel id="users">
                    <p:dataTable id="usersTable" value="#{personBean.allPersons}" paginator="true" rows="4" var="person"  >
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="Name" />
                            </f:facet>
                            <p:commandLink action="#{personBean.editPerson}">
                                <h:outputText value="#{person.name}" />
                                <f:setPropertyActionListener target="#{personBean.person}"
                                    value="#{person}" />
                            </p:commandLink>
                        </p:column>

                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="Age" />
                            </f:facet>
                            <p:commandLink action="#{personBean.editPerson}">
                                <h:outputText value="#{person.age}" />
                                <f:setPropertyActionListener target="#{personBean.person}"
                                    value="#{person}" />
                            </p:commandLink>
                        </p:column>
                    </p:dataTable>
                </p:outputPanel>
                <p:commandButton value="Create New User"
                    action="#{personBean.newPerson}" />
            </h:form>

总是我有相同的表格,我无法移动到2

0 个答案:

没有答案