setter方法在actionListener方法之前被激发

|
<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.方法获取新的设定值并执行操作。 谢谢,
已邀请:
而不是您的f:setPropertyActionListener,您应该使用:
<a4j:actionparam name=\"setViewMode\"
   assignTo=\"#{backingBean.selectTmpId}\"
   value=\"#{item.id}\"/>
最好将ajax4jsf控件与相关控件一起使用,而不是与jsf组件一起使用。
如果您将大型对象用作操作属性,则可以帮助您:
<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之间的引用循环上崩溃)

要回复问题请先登录注册