aspose file tools
The moose likes JSF and the fly likes richfaces tabPanel problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "richfaces tabPanel problem " Watch "richfaces tabPanel problem " New topic

richfaces tabPanel problem

S Majumder
Ranch Hand

Joined: Jun 03, 2009
Posts: 344
Hi every body ,

I am using richfaces tabPanle <rich:tabPanel>.On my tabpanle I am creating 3 different tabs .I am using the
valueChangeListener of tabPanle .

Here is my jsf code :

Here is my backing bean code :

My question is :
a) Can I handle the tab specific events ? Suppose I am clicking the "tab1" , in the backing bean only tab1 specific code will run or If I am pressing the tab2 only the "tab2" specific code will run . Is it possible ?

b) Suppose I have one command button , in my jsf is it possible when I am clicking that button it will open tab2 / tab3 (suppose currently tab-1 is opened)?

Thanks & regards,
Rishidharan Somu

Joined: Sep 23, 2007
Posts: 8

You can add the name attribute to <rich:tab/>.

In your changeTabAction(ValueChangeEvent valueChangeEvent) method,

String tab = (String) valueChangeEvent.getNewValue();

Now tab will be the name of the selected tab. Using this you will be able to perform the actions specific to the selected tab.
jQuery in Action, 2nd edition
subject: richfaces tabPanel problem