Get your CodeRanch badge!*
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 Java 8 in Action this week in the Java 8 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
ConversationalScoped not working
setting default value for a combobox
Need to display the value from a map as a label in a drop down using <h:selectOneMenu>
selectOneMenu
Error binding a h:selectOneMenu to a LinkedList