-
1. Re: how to invoke business method when switching tab
jhuska Mar 28, 2013 10:47 AM (in response to aindrilaacharya)Hello Aindrila,
have you tried to use
itemChangeListener
ofrich:tabPanel?
It needs to operate inserver
mode (switchType attribute). See VDL doc for tabPanel here:http://docs.jboss.org/richfaces/latest_4_3_X/vdldoc/
for more info.
Regards,
Juraj Huska
-
2. Re: how to invoke business method when switching tab
aindrilaacharya Mar 29, 2013 1:52 AM (in response to jhuska)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
Regards,
Aindrila Acharya
-
3. Re: how to invoke business method when switching tab
sivaprasad9394 Apr 3, 2013 12:17 AM (in response to aindrilaacharya)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="generalInfoLoad()"status="waitStatusGeneral" reRender="generalInformationPage">
<a4j:region id="generalInforegion">
<a4j:include id="generalInformationPage" viewId="/generalInfo.jsp"/></a4j:region>
</rich:tab>
<rich:tab limitToList="true" id="ExternalID" label="External ID" name="External ID" styleClass="myClass" ontabenter="externalIDLoad()"status="waitStatusExternal" reRender="externalIDPage">
<a4j:region id="externalIDregion"><a4j:include id="externalIDPage"
viewId="/external.jsp"/></a4j:region>
</rich:tab>
</rich:tabPanel>
<a4j:jsFunction name="generalInfoLoad" limitToList="true" immediate="true"reRender="generalInformationPage" ignoreDupResponses="true"
actionListener="#{existingCustomerBean.submitgeneralInfoTabLoad}"/>
<a4j:jsFunction name="externalIDLoad" limitToList="true" immediate="true"reRender="externalIDPage" ignoreDupResponses="true"
actionListener="#{existingCustomerBean.submitExternalIDTabLoad}"/>
It will call the backend action bean.
Thanks and Regards,
Siva