0 Replies Latest reply on May 17, 2008 12:24 AM by stephen

    Can't get rid of page parameter

    stephen

      I use two different request parameters to have bookmarkable URLs for a product or for a product group.
      When I was still manually picking up the values from the request parameter map it used to work fine, except that after login redirection the request parameters were lost.


      I followed suggestion here on the forum to use page parameters instead:


              <param name="productGroupId"/>
              <param name="productId"/>



      Now I had the much more severe problem that the parameters were always present and survived each request, so after I first selected a product I wasn't able anymore to select a product group instead.


      I tried Contexts.getPageContext().remove(productId), but that had absolutely no effect.


      A workaround I learned while browsing source code and debugging:



      FacesContext.
      getCurrentInstance().getViewRoot().getAttributes().remove("org.jboss.seam.PAGE$" + requestParamName); 



      Bug or by design?


      (BTW I don't really understand why redirect.captureCurrentView can't simply capture request parameters, also.)