【发布时间】:2015-09-07 15:29:58
【问题描述】:
我有一个 primefaces Web 应用程序,它由几个选项卡组成,用户可以在其中输入和编辑一些数据。如果用户编辑数据并想要保存它,他按下保存按钮,数据将被持久化到数据库中。如果他想恢复他的条目,他只需按下重置按钮。
每个选项卡都是一个自己包含的 .xhtml 页面。
现在我们要检查用户是否使用菜单导航或按下重置按钮,是否进行了一些更改,并询问他是否真的要浏览而不保存。
你有什么建议吗?
这里是标签页:
<p:tabView id="tabView"
activeIndex="#{management.activeTabIndex}"
rendered="#{management.dataFetched}"
styleClass="tab-view">
<p:ajax event="tabChange" update=":tabForm" />
<p:tab id="firstTab" title="First">
<p:panel id="firstPanel" styleClass="info-panel">
<ui:include src="/home/test/infoHost.xhtml" />
</p:panel>
</p:tab>
<p:tab id="secondTab" title="Second">
<p:panel id="secondPanel" styleClass="info-panel">
<ui:include src="/home/test/infoDb.xhtml" />
</p:panel>
</p:tab>
<p:tab id="thirdTab" title="Third">
<p:panel id="thirdPanel" styleClass="info-panel">
<ui:include src="/home/test/infoSt.xhtml" />
</p:panel>
</p:tab>
</p:panel>
</p:tab>
</p:tabView>
</h:form>
非常感谢!
【问题讨论】:
标签: jsf jsf-2 primefaces tabs