[ http://issues.apache.org/jira/browse/MYFACES-999?page=all ] Mike Kienenberger closed MYFACES-999: -------------------------------------
Resolution: Invalid Sounds likely. The value provided must return equals() == true for some member of the list. That probably won't happen if you're comparing a Short and an Integer. > Submitting form with selectOneMenu on it gives error "Value is not a valid > option" > ---------------------------------------------------------------------------------- > > Key: MYFACES-999 > URL: http://issues.apache.org/jira/browse/MYFACES-999 > Project: MyFaces > Type: Bug > Versions: 1.1.1 > Reporter: Scott Brissenden > > A selectOneMenu that I have been using successfully in MyFaces 1.0.9 is now > broken. Whenever I try to submit my form I get the error "Value is not a > valid option" > The code looks legal to me and is as follows: > <h:selectOneMenu id="prioritySrc" value="#{taskList.priority}"> > <f:selectItems value="#{taskForm.priorityItems}"/> > </h:selectOneMenu> > The backing bean code is: > private static SelectItem[] priorityItems = { > new SelectItem(new Integer(1), "High"), > new SelectItem(new Integer(2), "Medium"), > new SelectItem(new Integer(3), "Low"), > }; > public SelectItem[] getPriorityItems() { > return priorityItems; > } > I have confirmed that this problem does go away when I switch back to 1.0.9 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira