【发布时间】:2012-12-08 22:30:45
【问题描述】:
我正在使用丰富的面孔。
<rich:tabPanel id="feedModifyDetails" switchType="client">
<rich:tab id="ftpDefaultValuePanel" header="FtpDefaults">
some code
</rich:tab>
<rich:tab id="feedSchedule" header="FeedSchedules" >
some code
</rich:tab>
<rich:tab id="feedFTPCommunicationParams" header="FeedFTPCommunicationParams">
some code
</rich:tab>
<rich:tab id="feedFTPErrorEscalations" header="FeedFTPErrorEscalations"
switchType="ajax">
<ui:include src="ftpErrorEscalations.xhtml" />
</rich:tab>
<rich:tab id="ftpErrorAction" header="FtpErrorActionDefaults" switchType="ajax">
<ui:include src="ftpErrorAction.xhtml" />
</rich:tab>
</rich:tabPanel>
如上代码所示
- 对于rich:tabPanel,我使用的是switchType="client"。
- 对于最后 2 个 rich:tab,我使用了 switchType="ajax"。
预期结果:
- 当用户点击选项卡时,将加载最后两个选项卡。
错误:
当用户单击最后一个选项卡(AJAX 请求选项卡)中的任何一个时,将发送一个 ajax 请求,但响应将更新第一个选项卡
即:<rich:tab id="ftpDefaultValuePanel" header="FtpDefaults" >
我做错了吗?
【问题讨论】:
-
您可以尝试
immediate=true的ajax 请求选项卡并查看结果吗? -
谢谢老兄它成功了...你能告诉我背后的原因吗?
标签: jsf jsf-2 richfaces ajax4jsf