5 Replies Latest reply on Dec 28, 2009 8:35 AM by user1234

    tabPanel + get parameters

    svkap

      Hi all.

       

      I want to have RESTful tabs. I have a page and tabPanel inside. The page is getting get parameter EMail and displays some data. I want every tab to be with unique URL and to pass the EMail get parameters as well. For example:

       

      Tab_1: example.com/page.jsp?EMail=test@test.com&tab=Tab_1

      Tab_2: example.com/page.jsp?EMail=test@test.com&tab=Tab_2

       

       

      Now when I change the tabs the EMail parameter is lost and I cannot find how to assign unique URL for every tab.

       

       

      Thank you.

        • 1. Re: tabPanel + get parameters
          ilya_shaikovsky
          please download richfaces-demo sources and check how it's implemented there.
          • 2. Re: tabPanel + get parameters
            svkap

            Hi.

             

            Thank you for the quick reply. I downloaded the sources but I have some questions.. I see that some of this magic is done with org.richfaces.demo.common.ComponentNavigator class. However I can see that there only the url is rewritten after the tab is changed so it can be in sync. However I cannot find how the get parameters are intercepted so the correct tab to be shown (for example when the user writes the URL directly)..

            • 3. Re: tabPanel + get parameters
              nbelaevski

              Hi,

               

              Please take a look at: getComponentUri() & getCurrentComponent() methods of ComponentNavigator.

              • 4. Re: tabPanel + get parameters
                svkap

                Hi.

                 

                I have one (hopefully) last question. Tab and URL changing is working fine now... However I have one problem. The bean that is holding the logic is with request scope. However I have some get parameters that are passed to it (like user EMail). When the tabs are changed these parameters are lost. Can I preserve them (pass them between requests) without changing the scope of this bean?

                • 5. Re: tabPanel + get parameters

                  can you set the params in session , and can access it?

                   

                  FacesContext.getCurrentInstance().getExternalContext().getSessionMap()
                      .put("<name>", <value>);