【发布时间】:2013-03-27 09:05:06
【问题描述】:
在我的应用程序中,我有一个<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。
【问题讨论】:
标签: jsf-2 primefaces