Are you using Trinidad 1.0.x ?
Or 1.2.x
I added a call to the converter to convert index type of Integer to
the model type so that it doesn't get a validation error when
valuePassThru is false. This was caused by the change in EL
processing (this change is only true on JSF 1.2 / Unified EL)
On Thu, Dec 4, 2008 at 4:07 PM, Martin Kočí <[EMAIL PROTECTED]> wrote:
> Yes,
>
> but can you explain what TRINIDAD 1225 really does/wants? I want provide
> a patch including that functionality.
>
>
>
>
>
> Matthias Wessendorf píše v Čt 04. 12. 2008 v 15:33 +0100:
>> can you open a jira ticket ?
>>
>> On Thu, Dec 4, 2008 at 2:55 PM, Martin Kočí <[EMAIL PROTECTED]> wrote:
>> > 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
>> >
>> >
>> >
>> >
>> >
>> >
>>
>>
>>
>
>
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf