UISelectOne and UISelectMany fail with custom converter that returns 
java.lang.String from getAsObject() method.
----------------------------------------------------------------------------------------------------------------

         Key: MYFACES-1328
         URL: http://issues.apache.org/jira/browse/MYFACES-1328
     Project: MyFaces Core
        Type: Bug

    Versions: 1.1.4-SNAPSHOT    
    Reporter: Alexey Maslov


The problem seems to be in 
javax.faces.component._SelectItemsUtil.matchValue(FacesContext context, Object 
value, Iterator selectItemsIter, _ValueConverter converter) method.

Line 63-72:
                Object itemValue = item.getValue();
                if(converter != null && itemValue instanceof String)
                {
                    itemValue = converter.getConvertedValue(context, 
(String)itemValue);
                }
                if (value==itemValue || value.equals(itemValue))
                {
                    return true;
                }

If item's value is java.lang.String then this code does duplicate conversion 
making matchValue() return false and subsequently resulting in error in calling 
method (validateValue() in javax.faces.component.UISelectOne and 
javax.faces.component.UISelectMany).

-- 
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

Reply via email to