2 Replies Latest reply on Feb 17, 2009 4:14 PM by Gerry Fisher

    Navigation rule for a Parameterized method

    Gerry Fisher Newbie
      Does anyone know why my navigation rules no longer works after I parameterized the 'from-action' method? The only way I can get the rules to work is by moving them out of the action-specific navigation element into a global navigation element.

      This navigation rule no longer works but it used to, before I parameterized the processUser method:

      <navigation from-action="#{UserDetails.processUser}">
          <rule if-outcome="success">
              <redirect view-id="/confirmation.xhtml"></redirect>
          </rule>
          <rule if-outcome="failure">
              <redirect view-id="/userDetails.xhtml"></redirect>
          </rule>
      </navigation>


      This is how I have overcome the problem by moving the rules into the global navigation element:

      <navigation>
          <rule if-outcome="success">
              <redirect view-id="/confirmation.xhtml"></redirect>
          </rule>
          <rule if-outcome="failure">
              <redirect view-id="/userDetails.xhtml"></redirect>
          </rule>
      </navigation>


      Just to complete the picture, here's the action link from my User.xhtml page and the backing bean method:

      <h:commandLink action="#{UserDetails.processUser('SOM')}" />

      UserDetails.processUser(String type);