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  PLEASE Help - adding new value to dropdown 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 " PLEASE Help - adding new value to dropdown" Watch " PLEASE Help - adding new value to dropdown" New topic
Author

PLEASE Help - adding new value to dropdown

bash bashtoko
Greenhorn

Joined: Jan 20, 2011
Posts: 14


I have this code

<h:selectOneMenu id="beesh" onchange="submit()" valueChangeListener="#{testActionListener.processValueChange}" value="#{userBean.favCoffee2}">
<f:selectItems value="#{userBean.favCoffee2Value}" />
</h:selectOneMenu>


When I try to add a new option to the component .. it produce a class cast exception >>>>

java.lang.ClassCastException
at javax.faces.component.UIComponentBase$ChildrenList

Map<String, Object> map = new LinkedHashMap<String, Object>();
i.put("java", "course");
source.getChildren().add(map)

What is the problem.. please help..

Thanks..
Krishnakumar Ramanathan
Greenhorn

Joined: Aug 04, 2008
Posts: 6
are yu able to solve this issue ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: PLEASE Help - adding new value to dropdown
 
Similar Threads
Error binding a h:selectOneMenu to a LinkedList
setting default value for a combobox
selectOneMenu
ConversationalScoped not working
Need to display the value from a map as a label in a drop down using <h:selectOneMenu>