Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting the selected drop down value in the next page  RSS feed

 
Palaninathan Arumugam
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
This may be a simple question but I don`t know how to do in JSF.
I have a drop down box with values in the page1 and I want to capture the user selected value from the drop down in the page2. How can I do this?
Any sample code will be greatful.

Thanks
Palani
 
gary stines
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is what I did...

In the action method on the page1 bean I created the bean that is used for page2

Page2Bean pg2 = (Page2Bean )fc.getApplication().createValueBinding("#{page2}").getValue(fc);

where page2 is the managed bean name.

You should create a binding on page2 to a corresponding property in the Page2Bean. You then modify this property to reflect the changes on page2
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!