我使用Richfaces 3.3工作在JSF 1.2应用程序上。我有一个弹出窗口,其中包含rich:extendedDataTable
。当我点击表格中的一行时,我想启用或禁用一个按钮,我使用a4j:support event="onRowClick"
。richfaces a4j:支持事件意外调用后端方法
下面是一些代码:
<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}"
,但按钮不亮弹出窗口,但在弹出窗口之外的页面上。任何想法为什么有被称为除了用于表的其他方法?
ajaxSingle =“true”不能帮助我,因为我想要处理一些其他组件。 – 2012-07-12 09:18:28
您可以在a4j:support标签中使用流程属性,然后列出您要处理的所有组件。 – 2012-07-12 10:07:47