4 Replies Latest reply on Jun 1, 2007 1:41 PM by gavin.king

    badly behavior of <s:button> with page actions

      Hello,

      I have found a badly behavior of the seam <s:button> when it has an associated action A after which a page action B must happen (before rendering the page).

      The badly behavior consists in that the action B is executed before the action A; this is an inverted order with respect to what one hopes.

      My concrete example is the following:

      pages.xml contains the page action:

      <page view-id="/pages/security/profileGestion/profiles.xhtml">
       <action execute="#{profileGestion.getProfiles}"/>
      </page>


      profiles.xhtml contains a <s:button> :

      <s:button id="cancel" value="Cancel"
       action="#{profileGestion.cancelUpdates}"
       styleClass="button" />


      When the user presses the button, the log flags show the invocation of methods of profileGestion EJB in the following mistaken order:
      getProfiles(), cancelUpdates()

      When I change the seam <s:button> by the Tomahawk <t:commandButton> I get the correct behavior because the log flags show the invocation of methods of profileGestion EJB in the following good order:
      cancelUpdates(), getProfiles()

      I would like to know an explanation about the mistaken behavior with the seam <s:button> when it is combined with a page action.

      Thanks in advance,
      Maria Consuelo Franky