1 2 3 Previous Next 30 Replies Latest reply on Aug 1, 2007 5:26 PM by sergeysmirnov Go to original post
      • 30. Re: <a4j:commandButton> and <h:messages/>

         

        "SergeySmirnov" wrote:

        ...Frankly speaking, I must to say that having such code is not correct in the property getter as soon as the getter is called several times during the JSF lifecycle. I guess, it does not called exactly at the moment you expect. You can check it if you put a phase tracker to your application.


        The key moment is above.

        The reason is in order when the h:message is rendered and the getter is called. Both activities are at the sixth phase as you know.

        In case of h:commandButton, the whole view is rendered.
        In case of a4j:commandButton, only the required areas one by one are rendered.

        Not JSF itself nor Ajax4jsf guaranty the exact order.

        The fact that using the getter for validation purpose is incorrect from the JSF architecture point of view.

        1 2 3 Previous Next