SimpleSelectOneRenderer _convertIndexedSubmittedValue must not convert indexed 
item
-----------------------------------------------------------------------------------

                 Key: TRINIDAD-1513
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1513
             Project: MyFaces Trinidad
          Issue Type: Bug
    Affects Versions:  1.2.11-core
            Reporter: Bernhard Seebass


The method  SimpleSelectOneRenderer._convertIndexedSubmittedValue(), which is 
used when valuePassThru is false, tries to convert the stored object using the 
following code:

...
    SelectItem item = selectItems.get(index);
    if (item != null)
    {
      Object converted = item.getValue();
      if (converter != null && converted != null)
      {
        converted = converter.getAsObject(context, component, 
converted.toString());
      }
      return converted;
    }
...

Actually the converted object recieved by item.getValue() is exactly what is 
needed, whereas there is no reason to assume that converted.toString() produces 
anything useful.


So the obvious fix would be:
...
    SelectItem item = selectItems.get(index);
    if (item != null)
    {
      return item.getValue();
    }
...

Any objections?

Regards,
 Bernhard

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to