myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kočí <Martin.K...@aura.cz>
Subject [Trinidad] TRINIDAD 1225 breaks valuePassThru
Date Thu, 04 Dec 2008 13:55:44 GMT
Hi,

TRINIDAD  1225  changed method
SimpleSelectOneRenderer._convertIndexedSubmittedValue(FacesContext,
UIComponent, Object)


from 

SelectItem item = selectItems.get(index);
if (item != null)
      return item.getValue();
    else
      return null;


to

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;
    }
else
    {
      return null;
}

Problem:  each one SelectItem instance has an entity object as value
(for example an instance User) and valuePassThru=false -> renderer
encodes select item values as indexes in HTML. Before TRINIDAD 1225
simple  item.getValue() was uses in decode, but now
converter.getAsObject is called.

I think the convenience of valuePassThru feature is the no need for
getAsObject implementation in converters. But now this is gone.


Regards,

Martin






Mime
View raw message