• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

richfaces tabPanel problem

 
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 8
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic