1 Reply Latest reply on Jun 25, 2008 3:10 AM by Kerdudou Ronan

    [a4j:support] EL in reRender not refreshed

    Kerdudou Ronan Apprentice

      Hi all,

      I'm using RF 3.2.1.RC3 with JSF 1.2 and jsp.

      I tried to use the following feature :

      You can use JSF EL expression as a value of the reRender attribute. [...] The EL for reRender is resolved right before the Render Response phase. Hence, you can calculate what should be re-rendered on any previous phase during the Ajax request processing.

      I got a list of items that have a h:selectBooleanCheckbox with a a4j:support:

      <h:selectBooleanCheckbox id="selectionItem" value="#{item.selectionne}"
       disabled="#{! item.selectionnable || panier.disabled }"
       onclick="blur();" title="#{item.title}">
       <a4j:support event="onchange" reRender="#{myBean.reRenderOnSelect}, dragZonePanel,selectionnerTous" action="#{myBean.onChangeModifierSelectionItem}"
       ignoreDupResponses="true" requestDelay="150" eventsQueue="selectionQueue">
       <a4j:actionparam name="paramId" assignTo="#{myBean.paramId}" value="#{item.id}" />

      When the result of the #{myBean.reRenderOnSelect} EL is updated, the view is not updated and then when the 'onchange' event occurs, the 'reRenderOnSelect' zone is not rerendered. This is the previous zone that is rendered

      If I put a breakpoint on myBean.getReRenderOnSelect(), the method is not always called. And when called, I can see the following in the RichFaces source code:

      //FIXME: Why do we evaluate reRender right now?
      //Collection can change any time.
      ((UIAjaxSupport) component).setReRender( AjaxRendererUtils.asSet(reRender.getValue(getELContext())));

      in the setReRenderProperty(UIComponent component)
      method of the AjaxSupportTag.java class

      Notices that the items are also draggable and in this case this works perfectly. The right zone to rerender is refreshed.

      Is this a known bug or a bad use of a4j:support ? Is there a fix ? a workaround ?