This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

richfaces tabPanel problem

 
S Majumder
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic