This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSF and the fly likes Getting the selected drop down value in the next page Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Getting the selected drop down value in the next page" Watch "Getting the selected drop down value in the next page" New topic
Author

Getting the selected drop down value in the next page

Palaninathan Arumugam
Greenhorn

Joined: Apr 25, 2005
Posts: 4
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

Joined: Mar 11, 2002
Posts: 19
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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Getting the selected drop down value in the next page
 
Similar Threads
Java Script Drop-down option deletion but little bit different
Drop Downs
Auto generate drop down list
Retrieving a drop-down list value.
new to struts - selected item from drop down list