2 Replies Latest reply on Apr 23, 2008 8:11 AM by jhs2zz

    a4j:support, re-render and action, processing order?

    jhs2zz

      Hi, I am adding ajax support to checkboxes. On value change of the checkbox, I d like to:

      1. firstly do something by specifying "action=???", the action changes some parameters which affects the way UI are rendered

      2. re-render UI according to new parameter values

      Each bits is working, but when put together they just dont work in proper order. It seems it is always re-rendering the page first, then execute the action. But I want the other way round, because the action changes parameter values for rendering the page.

      How can I fix this please?

      Any suggestions are very much appreciated!

      Thanks!

        • 1. Re: a4j:support, re-render and action, processing order?

          in JSF, the action is invoked of the fifth JSF lifecycle phase, but rendering happens on the sixth phase. So, the order is: first action, second rendering. This is a normal JSF behaviour and RichFaces does not changes anything in this behaviour.
          May be you mismatch rendering with something else.

          • 2. Re: a4j:support, re-render and action, processing order?
            jhs2zz

            Thanks you are right!

            It was because of my code error. The action I specified was to change the checkbox boolean value, which is in fact changed by the setter automatically. so changing it again in the action causes the wrong check box value. Together this produced false perception that it is re-rendering first then do the action.

            Thanks again.