【发布时间】:2012-07-11 14:10:47
【问题描述】:
我使用 Richfaces 3.3 开发 JSF 1.2 应用程序。我有一个包含rich:extendedDataTable 的弹出窗口。当我单击表中的一行时,我想启用或禁用一个按钮,我使用a4j:support event="onRowClick"。
这里有一些代码:
<h:form>
<rich:panel id="main">
<a4j:commandButton id="completed" value="Completed"
rendered="#{bean.completedCase}" />
<a4j:commandButton value="Open"
oncomplete="#{rich:component('popupId')}.show(...)">
</a4j:commandButton>
<rich:modalPanel id="popupId">
<a4j:region>
<rich:extendedDataTable id="source" value="#{bean.sourceItems}"
var="sourceItem" selectionMode="single" >
<a4j:support event="onRowClick" eventsQueue="pickQueue" reRender="copy" >
<f:setPropertyActionListener value="#{sourceItem}"
target="#{bean.sourceSelection}" />
</a4j:support>
....
</rich:extendedDataTable>
<a4j:commandButton id="copy" value="Copy" />
</a4j:region>
<a4j:commandButton value="Ok" reRender="completed"
oncomplete="#{rich:component('popupId')}.hide();return false;">
</a4j:commandButton>
</rich:modalPanel>
</rich:panel>
</h:form>
问题是,当我单击一行时,在后端调用了一些用于呈现按钮的方法:rendered="#{bean.completedCase}",但该按钮不在弹出窗口上,而是在弹出窗口之外的页面上。知道为什么要调用其他方法而不是用于表格的方法吗?
【问题讨论】:
标签: richfaces jsf-1.2 ajax4jsf richfaces-modal