4 Replies Latest reply on Oct 20, 2009 10:45 AM by blabno

    Seam and GET parameters

    Enrico Drusiani Newbie

      i'm building a page with a simple css skin system which uses a parameter in the url. Example (http://localhost/myapp/home.seam?skin=a)

      everything works fine the first time i write the url and connect, but if i change the value of skin to b and hit enter as well as clicking on a link with a different value, the page reloads without even calling the seam action method.

      i guess there's some option which has to be specified on the pages.xml (i tried with on-postback="false" but didn't help) but i can't find which one.

      Any suggestion?
        • 1. Re: Seam and GET parameters
          Enrico Drusiani Newbie

          i forget to mention, i'm on Seam 2.1.1 and JBoss 4.2.3

          • 2. Re: Seam and GET parameters
            blabno Master

            How about page.xml source ?

            • 3. Re: Seam and GET parameters
              Enrico Drusiani Newbie
              yes, sorry for haven't posted it from the start

              my application is developed almost entirely inside /modules/, leaving in the root just the home.xhtml

              <?xml version="1.0" encoding="UTF-8"?>
              <pages xmlns="http://jboss.com/products/seam/pages"
                     xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.1.xsd"
                  <page view-id="/modules/*" login-required="true">
                          <rule if-outcome="logout">
                              <redirect view-id="/home.xhtml"/>
                  <page view-id="/home.xhtml" login-required="false" >
                       <action execute="#{identity.isLoggedIn}" on-postback="true" />
                                 <rule if-outcome="modAccess">
                                      <redirect view-id="/modAccess.xhtml"/>

              i'm getting the GET parameters in the url with this code.

                   javax.faces.context.FacesContext facesContext = javax.faces.context.FacesContext.getCurrentInstance();
                      HttpServletRequest request = (HttpServletRequest)facesContext.getExternalContext().getRequest();

                      param = request.getParameter("skin");
              • 4. Re: Seam and GET parameters
                blabno Master

                Please post full bean code and full facelet source.