开发者

Setter methods get fired before actionListener method

<a4j:commandButton id="viewTemplate" value="select" 
actionListener="#{msgCustomizationMgmtBean.viewMsgContent}" 
ajaxSingle="true" reRender="reviewArea">
<f:setPropertyActionListener value="#{item.id}" target开发者_如何学编程="#{backingBean.selectTmpId}"/></a4j:commandButton>

i use f:setPropertyActionListener to pass value into backing bean, but i found it got fire after actionListener method. is there anyway to make fire before it. like following sequence. 1. set backing value. 2. method get new set value and perform operation.

thank you,


Instead of your f:setPropertyActionListener you should use:

<a4j:actionparam name="setViewMode"
   assignTo="#{backingBean.selectTmpId}"
   value="#{item.id}"/>

It's better to use ajax4jsf controls togheter with its related controls than with jsf components.


If you use large objects as action-property, this may help you:

<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 will crash on reference-loop between object-instances RF-2576)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜