This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "richfaces tabPanel problem " Watch "richfaces tabPanel problem " New topic
Author

richfaces tabPanel problem

S Majumder
Ranch Hand

Joined: Jun 03, 2009
Posts: 244
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,
S.
Rishidharan Somu
Greenhorn

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: richfaces tabPanel problem
 
Similar Threads
RichFaces TabPanle problem
how to set same tab size using JSF and richfaces
richfaces tab and jsp:include problem
How to switch between tabs in swings?
Help with tabbed Panel