【发布时间】:2013-10-20 03:56:35
【问题描述】:
所以我有一个
A.xhtml
<p:tabView id="headOfAccountsId_tabview">
<p:tab title="Main Head Of Accounts" id="mainHeadOfAccountsId_tab">
// completely finished with codes
// here i have done some inputtext fields with jsf validation ,
// and submit button to call action on ajax
// and p:datatable to view only records and user can edit and delete record on ajax
</p:tab>
<p:tab title="Sub Head Of Accounts" id="subHeadOfAccountsId_tab">
// just have open and closing tags of p:tab i meant i will do code later here
</p:tab>
</p:tabView>
我还有另一个 xhmt 文件用于我正在使用的不同目的
B.xhtml
// all the input fields outside the <p:tabView >
// here i have done some inputtext fields with jsf validation ,
// and submit button to call action on ajax
<p:tabView >
<p:tab>
//p:datatable to view only records
</p:tab>
<p:tab>
//p:datatable to view only records
</p:tab>
</p:tabView>
我的问题是我在两个文件(A 和 B)中都使用过
<p:ajax event="tabChange" />
但在文件 A.xhtml 中,当我更改选项卡侦听器时,不会调用方法(java 类的操作方法)而没有
immediate="true"
当我更改选项卡时,在文件 B.xhtml 中调用的方法没有
immediate="true"
谁能让我明白发生了什么?或者我们为什么/在哪里使用“立即”属性? 我应该发布我的整个代码吗?
【问题讨论】:
标签: jsf jsf-2 primefaces datatable