When traversing the source code for UISelectOne
, I came across the following piece of code within the protected void validateValue(FacesContext context, Object value)
method:
boolean found = SelectUtils.matchValue(getFacesContext(),
this,
value,
new SelectItemsIterator(context, this),
getConverter());
Consider the following declaration:
<h:selectOneRadio value="#{bean.pr}" converter="Conv" required="true" requiredMessage="msg">
<f:selectItems value="#{bean.dates}" />
</h:selectOneRadio>
The converted value should be equal to one of the values I've populated the list with. The actual value has a different type than expected, so I get a validation error.
Question: Why is the converted value not consistent with the validated value?