私のアプリケーションでは、<p:dataTable>
遅延データモデルを使用したページネーションがあります。
ページから別のページ ボタンをクリックすると、確認ポップアップが生成される必要があります。クリックyes
すると別のページに移動でき、[いいえ] をクリックすると別のページに移動できず、そのまま残ります。その現在のページで。
.xhtml コードを以下に示します。
<h:form id="userListForm">
<p:dataTable var="user" id="userTable" value="#{userListController.userDataModel}" lazy="true" paginator="true" rows="25" paginatorPosition="bottom"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="25,50,100" widgetVar="userDataTable" styleClass="userTable" selectionMode="single" >
<p:ajax event="page" />
<p:column id="nameColumn" headerText="#{adbBundle['name']}"
sortBy="#{user.fullName}" filterBy="#{user.fullName}" styleClass="userName">
<h:outputText value="#{user.fullName}" />
</p:column>
<!-- other columns -->
<:/p:dataTable>
</h:form>
私はprimefaces 3.4、jsf 2.0を使用しています。