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

    Seam and GET parameters

    Enrico Drusiani Newbie
      Hi

      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
            Bernard Labno 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"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.1.xsd"
                     no-conversation-view-id="/home.xhtml"
                     login-view-id="/home.xhtml">
                    
                  <page view-id="/modules/*" login-required="true">
                 
                      <navigation>
                          <rule if-outcome="logout">
                              <redirect view-id="/home.xhtml"/>
                          </rule>
                      </navigation>
                  </page>
                 
                  <page view-id="/home.xhtml" login-required="false" >
                       <action execute="#{identity.isLoggedIn}" on-postback="true" />
                           <navigation>
                                 <rule if-outcome="modAccess">
                                      <redirect view-id="/modAccess.xhtml"/>
                                 </rule>
                            </navigation>
                 
                  </page>
              ...

              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
                Bernard Labno Master

                Please post full bean code and full facelet source.