This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes How to retrieve the selectedItem value from <h:selectOneListBox> tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How to retrieve the selectedItem value from <h:selectOneListBox> tag" Watch "How to retrieve the selectedItem value from <h:selectOneListBox> tag" New topic
Author

How to retrieve the selectedItem value from <h:selectOneListBox> tag

Anshul Chandra Saxena
Greenhorn

Joined: Sep 10, 2009
Posts: 14
Hi

I have to develop a <h:selectOneListBox>, wherein there will be 4 items.That is the dropdown will have 4 items. I need to retrieve the value that the user is selecting. I am facing the problem while retrieving the value. Its always coming null.

My Backing Bean is:


The view.jsp is as:


Now, whenever i try to get the selectedValue like



i get a NullPointerException.

Can anyone please help, how to retrieve the selected Value.

thanks
Anshul Chandra Saxena
Greenhorn

Joined: Sep 10, 2009
Posts: 14
Hi

Can anyone please help with this ?

thanks
 
wood burning stoves
 
subject: How to retrieve the selectedItem value from <h:selectOneListBox> tag
 
Similar Threads
How to prepopulate combo boxes on page startup
javax.xml.rpc.soap.SOAPFaultException: System.Web.Services.Protocols.SoapException:
Self Join Query Help
Dynamic Radio Button
Can't get JSF selectOneMenu to show list of items