aspose file tools
The moose likes JSF and the fly likes trouble getting value of selectOneMenu 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 "trouble getting value of selectOneMenu" Watch "trouble getting value of selectOneMenu" New topic
Author

trouble getting value of selectOneMenu

Sushma Sharma
Ranch Hand

Joined: Jun 02, 2005
Posts: 139
Hi experts,

I am having trouble receiving a select box's value at the back end. My requirement is that the user can search a person on the basis of userid ( uid) or last name or id, so I created a select box ( searchTypeSelect) for that. now the user specifies the keyword in a text box and on the basis of the combination of this text and searchTypeSelect, I have to populate another list box ( uidSelect). for the time being I have created arrays of values in the javascript and I populate this list box ( uidSelect) from those arrays. Now the user can select any of the options populated and clicks submit and then I navigate it to the managed bean method.
but my problem is that I am not able to get this box ( uidSelect)'s value in the backed bean method. Actually if I use empty selectOneMenu and then I populate it from the javascript, it doesn't go to the backbean method, the page just gets refreshed. If I hard code some values in the selectOneMenu, then if I choose any of the hardcoded options, then the control goes to the back bean method otherwise don't. I don't know what is wrong with my code.

I tried to upload my code, but this site is not letting me post it. please send me your email and I can send you the file there.

is there any way I can use either html <select> or selectOneMenu and get the value in the backed bean method? Is it possible to get an html select's value at the back end in JSF?
can somebody tell me what is problem here?

Thanks,
Sushma
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: trouble getting value of selectOneMenu
 
Similar Threads
How to iterate using struts 2 ?
MultiSelect and JavaScript
Pre-select collection of options (drop-downs)
how to get html select's value in the bean
show and insert data from list depending on choice of radio button