<a4j:commandButton id="viewTemplate" value="select"
actionListener="#{msgCustomizationMgmtBean.viewMsgContent}"
ajaxSingle="true" reRender="reviewArea">
<f:setPropertyActionListener value="#{item.id}" target="#{backingBean.selectTmpId}"/></a4j:commandButton>
我使用f:setPropertyActionListener将值传递给支持bean,但是我发现它在actionListener方法之后被激活了。无论如何要在它之前制造火焰。喜欢以下顺序。 1.设定支持价值。 2.方法获取新的设定值并执行操作。
谢谢,
答案 0 :(得分:2)
您应该使用:
而不是您的f:setPropertyActionListener<a4j:actionparam name="setViewMode"
assignTo="#{backingBean.selectTmpId}"
value="#{item.id}"/>
最好使用ajax4jsf控件来处理其相关控件,而不是使用jsf组件。
答案 1 :(得分:0)
如果您将大对象用作action-property,这可能会对您有所帮助:
<a4j:commandButton action="dia_ok" actionListener="#{projectBean.dias.doDelete}" id="deleteScreenshot" reRender="panelTitle" value="Loeschen">
<a4j:support event="onclick" ajaxSingle="true">
<f:setPropertyActionListener target="#{projectBean.dias.selected}" value="#{dia}" />
</a4j:support>
</a4j:commandButton>
(a4j:actionparam将在对象实例RF-2576之间的引用循环上崩溃)