-
1. Re: Invoking bean's method on <rich:tab> click
shadowcreeper Nov 18, 2008 4:36 PM (in response to ad-rocha)All you should need is an a4j:jsFunction with the correct action parameters and to use something like:
<rich:tab ontabenter="jsEnterFuncName();" onclick="jsClickFuncName();" ontableave="jsLeaveFuncName();">
-
2. Re: Invoking bean's method on <rich:tab> click
ilya_shaikovsky Nov 19, 2008 3:59 AM (in response to ad-rocha)if your tab panel switch type = server or ajax - just use corresponding tab attributes action and actionListener. Or valueChangeListener for tabPanel itself. You should not duplicate this built in functionalyti with supports because duplicated submits will be risen in this case.
If you use client side tab panel - then yes you could use supports or jsFunctions but why then you need client side switch type? ;)
Minor. B.t.w. ontabchange - event of tabPanel but not a tab event. -
3. Re: Invoking bean's method on <rich:tab> click
damianharvey Jan 16, 2009 6:26 AM (in response to ad-rocha)If you are using the ontabchange event, is there a way to get the name of the tab that has been selected?
I see that it is in the event but I'm not sure how to access it.
Thanks,
Damian. -
4. Re: Invoking bean's method on <rich:tab> click
ilya_shaikovsky Jan 16, 2009 6:33 AM (in response to ad-rocha)you could use valueChangeListener on tabPanel. And invoke the request with support pointed to this event without any action. So in the valuechangelistener you'll be able to get source of the event.
-
5. Re: Invoking bean's method on <rich:tab> click
sks.sauravs Jun 7, 2012 8:37 AM (in response to ilya_shaikovsky)Hi Ilya Shaikovsky,
I am a great fan of your works. I find your solutions very usefull when i can't find a work-around.
As my problem is related to <rich:tab> so i am posting my issue here, sorry if i have done anything wrong. I am a new guy in this community. Hope you guys won't mind.It is clear that onclick attribute is present for rich:tab (http://docs.jboss.org/richfaces/latest_3_3_X/en/tlddoc/rich/tab.html). But it is not working for me. Infact i have also tried oncomplete, ontabentered, onlabelclick.
The switchType for rich:tabPanel is "client".
It would be a great help if you give me any solution. Thanks in advance.
-
6. Re: Invoking bean's method on <rich:tab> click
sks.sauravs Jun 7, 2012 9:53 AM (in response to sks.sauravs)Sorry i was using Richface 4.1.0.CR1. So the reference link i provided on the last post should be (http://docs.jboss.org/richfaces/4.1.X/4.1.0.CR1/vdldoc/rich/tab.html). And i have found a solution to my problem using "onenter" (which i believe, is replacement for ontabentered) instead of "onclick". Thank you.