3 Replies Latest reply on Apr 3, 2013 12:17 AM by Siva P

    how to invoke business method when switching tab


      when switching tab,I need to invoke business method from our service class by assigning fully qulified method name in action/actionListener attribute of rich tab. But it is not invoking the method as per my requirement(checked by debugging mode)

      Can any body please help in this context

      Thanks in advance

      Code snippet as follows:

      <rich:tab header="Kyc" id="kyc"




        • 1. Re: how to invoke business method when switching tab
          Juraj Húska Master

          Hello Aindrila,


          have you tried to use itemChangeListener of rich:tabPanel? It needs to operate in server mode (switchType attribute). See VDL doc for tabPanel here:


          for more info.



          Juraj Huska

          • 2. Re: how to invoke business method when switching tab
            AINDRILA ACHARYA Newbie

            Hello Juraj ,


            Thanks for ur reply.

            Switch Type of my rich:tabpanel is ajax and I want to call the business method from rich:tab instead of rich:tabPanel.

            Throgh rich:tab property styleclass I can invoke business method but I want to invoke same by using action/actionListner property of rich:tab.


            Please reply how to solve that.


            Thanks in advance



            Aindrila Acharya

            • 3. Re: how to invoke business method when switching tab
              Siva P Master

              Hi Acharya,


              From rich:tab you can call the backend bean action usin like below,

              using a4j:function it is possible to call the backend while clicking the tab in the screen.In rich:tab ontabenter is there for calling the js scrip and actionListener.

              add this in jap page or xhtml page.


              <rich:tabPanel switchType="ajax" id="tp1" styleClass="tabbertab">

                  <rich:tab limitToList="true" id="GeneralInfo" label="General Info" name="General Info" styleClass="myClass" ontabenter=

                    status="waitStatusGeneral" reRender="generalInformationPage">

              <a4j:region id="generalInforegion">

                  <a4j:include id="generalInformationPage" viewId="/generalInfo.jsp"




                <rich:tab limitToList="true" id="ExternalID" label="External ID" name="External ID" styleClass="myClass" ontabenter=

                status="waitStatusExternal" reRender="externalIDPage">

              <a4j:region id="externalIDregion"

                 <a4j:include id="externalIDPage"









              <a4j:jsFunction name="generalInfoLoad" limitToList="true" immediate="true"

              reRender="generalInformationPage" ignoreDupResponses="true"


              <a4j:jsFunction name="externalIDLoad" limitToList="true" immediate=

              reRender="externalIDPage" ignoreDupResponses="true"



              It will call the backend action bean.


              Thanks and Regards,