4 Replies Latest reply on Sep 11, 2007 8:11 AM by kaviarasu

    redirecting to a particular tab through a method

    kaviarasu

      Hi im using the coding



      public String edit() {
       em.merge(tblu);
       return "/prodis.xhtml";
       }


      im using write.xhtml in which the sumbit button is pressed the above method is called and redirecting the page to prodis.xhtml this page has three tabs i want to open the third tab where the user was previously visited.

      <rich:tabPanel switchType="client">
       <rich:tab label="Product Features">
       </rich:tab>
       <rich:tab label="Expert Reviews">
       <ui:include src="expertreview.xhtml"></ui:include>
       </rich:tab>
       <rich:tab label="User Reviews">
       <ui:include src="read.xhtml"></ui:include>
       </rich:tab>
       </rich:tabPanel>


      thank u
      regards
      kaviarasu

        • 1. Re: redirecting to a particular tab through a method
          ilya_shaikovsky

          use selectedTab attribute on tabPanel.

          • 2. Re: redirecting to a particular tab through a method
            kaviarasu

            Hi
            thanks for ur reply
            but at begining in prodis.xhtml the first tab want to be opened. in the third tab there is a link when user click the link it take to other page. when the user press submit the values in that page the method is called and the page is redirected to this prodis.xhtml.but this time only the third tab open where the user was previous.
            when i use selectedtab when the page is loaded the third tab is opened.
            so it want to open after redirecting again to this page

            • 3. Re: redirecting to a particular tab through a method
              ilya_shaikovsky

              Ok.. So you need to save in your model the name of the opened tab and point selectedTab attribute to this property on the page that will be opened.

              • 4. Re: redirecting to a particular tab through a method
                kaviarasu

                Thank u
                But im getting the error of

                java.lang.NoClassDefFoundError: org/richfaces/component/UITabPanel


                im using redhatdeveloperstudio with seam 2.0.0.BETA1


                i added the jar file by right clicking the project in project explorer then select buildpath---configure build path and added the jars

                then i added the following lines in my project

                import org.richfaces.component.UITabPanel;
                private UITabPanel utp;
                
                 public UITabPanel getutp()
                
                 {
                 return utp;
                
                 }
                
                public void doi(){
                 Integer s= (Integer) getutp().getSelectedTab();
                
                 }



                after building the project im getting the error

                java.lang.NoClassDefFoundError: org/richfaces/component/UITabPanel



                Is my procedure to add the package to my project is correct or how to configure the packages