2 Replies Latest reply on Jul 9, 2007 2:34 AM by Gavin King

    Preserving querystring during redirect.captureCurrentView()

    Monkey Den Master

      Is there a way to preserve the querystring during redirect.captureCurrentView()? I have a requirement which states that some screen elements are to be displayed when the user is logged in, otherwise, display a login link. This page has querystring parameters which need to be preserved after the login challenge, to allow for bookmarking. It appears as though this code from Redirect.captureCurrentView() only preserves the submitted values

      parameters = Pages.instance().getViewRootValues(context);


      The next issue will be that a redirect is happening, in which case the client will still have the URL of the login page in the address bar.

      I'm thinking about doing something like this, where the first action will capture the querystring and and add them to the current view:

      <event type="org.jboss.seam.notLoggedIn">
       <action expression="#{myBean.loginChallengePreserveQueryString}"/>
       <action expression="#{redirect.captureCurrentView}"/>
      </event>