2 Replies Latest reply on May 2, 2011 3:28 PM by aareshchanka

    passing pages as parameters in page flow

    simomon
      Hi,

      is there a way to get the previous pages reference passed into the page flow, without knowing its name ?

      at the moment i do it with

      <ui:include src="/register_player.xhtml" />

      but i would like to be able to pass a parameter in the pageflow which allows the previous page to be used

      ie ...<ui:include "previous_page">

      this way i could create a general warning template which takes the previous page as a parameter ?

      which i could slot in between existing pages ?



        • 1. Re: passing pages as parameters in page flow
          lvdberg

          Hi,


          you can use:




          #{facesContext.externalContext.requestServletPath}#{facesContext.externalContext.requestPathInfo}



          or use the conversation's component view property viewId.


          Leo

          • 2. Re: passing pages as parameters in page flow
            aareshchanka

            you can create custom event to capture view and use the same as for example for not loggined event in components.xml




            <event type="org.jboss.seam.security.notLoggedIn">
                    <action execute="#{redirect.captureCurrentView}"/>
                </event>
                
                <event type="org.jboss.seam.security.loginSuccessful">
                    <action execute="#{redirect.returnToCapturedView}"/>
                </event>