UISelectOne Validation Error: "Value is not a valid option" in MyFaces Core
1.1.5 (Doesn't Occur in 1.1.4)
----------------------------------------------------------------------------------------------------------
Key: MYFACES-1677
URL: https://issues.apache.org/jira/browse/MYFACES-1677
Project: MyFaces Core
Issue Type: Bug
Affects Versions: 1.1.5
Environment: Mac 0S X 10.4.10
Reporter: Ben Hanney
After recently upgrading to 1.1.5 from 1.1.4 I've noticed the following
problem, this simple selectOneMenu
no longer passes validation. The Validation phase always fails with the message
"Value is not a valid option".
<h:selectOneMenu id="country"
value="#{UserAccountDataBean.userAccount.country.countryId}"
required="true">
<f:selectItems value="#{UserAccountDataBean.countrySelectItems}"/>
</h:selectOneMenu>
The type of countryId is an Integer and it is initially null. The selectOneMenu
is inside a form within a subview.
I tried using a PhaseTracker to see what was going on:
BEFORE APPLY_REQUEST_VALUES(2)
Submitted null Local null Value null
AFTER APPLY_REQUEST_VALUES(2)
Submitted 1 Local null Value null
BEFORE PROCESS_VALIDATIONS(3)
Submitted 1 Local null Value null
AFTER PROCESS_VALIDATIONS(3)
Submitted 1 Local null Value null
BEFORE RENDER_RESPONSE(6)
Submitted 1 Local null Value null
AFTER RENDER_RESPONSE(6)
Submitted 1 Local null Value null
The submitted value 1 is definitely in the Options list so there's no reason
validation should fail. Indeed if I change nothing and revert back to 1.1.4
everything is fine.
Cheers,
Ben
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.