1 Reply Latest reply on Dec 16, 2009 2:10 PM by Fabio Affinito

    Reference parameter from pages.xml

    Brendan Farragher Newbie

      Thought I'd post this little snippet, as it wasn't the most intuitive thing to come by... If you pass a parameter from a link on one of your pages, and you want to reference the value of that parameter inside pages.xml, do the following (using the param object was the key):


      Link on the page:


      <s:link styleClass="MenuOptionText" value="#{item.label}" action="redirectToUri">
      <f:param name="targetUri" value="http://labs.jboss.com/jbossrichfaces/"/>
      </s:link>



      pages.xml:


      <rule if-outcome="redirectToUri">
      <end-conversation before-redirect="true"/>
      <redirect view-id="/uriSelectionRedirector.xhtml">
                 <param name="targetUri" value="#{param.targetUri}"/>
      </redirect>
      </rule>