1
我有一個使用在WebSphere Application Server V8.5.5上運行的primefaces版本6.0創建的巨大JSF應用程序。我想避免嵌套窗體,所以我的p:tabView
不包含在窗體中,但每個窗體都有自己的窗體。資料來源爲我的標籤視圖看起來是這樣的:Primefaces在p:tabView選項卡上提交表單
<p:tabView activeIndex="#{tabViewBean.selectedTab}" id="tabView" dynamic="true" cache="false" widgetVar="tabViewWidget">
<p:ajax event="tabChange" listener="#{tabViewBean.handleTabChange}" update=":tabView" />
<p:tab id="tab1" title="First tab">
<h:form id="FirstTabForm">
<ui:include src="/views/test/firstTabTab.xhtml"/>
</h:form>
</p:tab>
<p:tab id="tab2" title="Drugi tab">
<h:form id="SecondTabForm">
<ui:include src="/views/test/secondTab.xhtml"/>
</h:form>
</p:tab>
... more tabs ...
</p:tabView>
有沒有一種方法可以讓我提交表單當前選項卡內沒有點擊裏面的命令按鈕。我希望在選項卡更改事件上實現這一點。
每個選項卡都有15-20個輸入字段,我不想在每個值更改上使用ajax,因爲它顯着減慢了我的應用程序。