Converters

Digging into this has led me to discover the following recursion (in red):

Form.bindPropertyToField(Object, Property, Field) line: 801
NativeSelect(AbstractField<T>).setPropertyDataSource(Property) line: 758
NativeSelect(AbstractField<T>).[color=#ff0000]
convertFromDataSource(Object) line: 836
[/color]
[b]
ObjectToNativeSelectConverter.convertToPresentation(Object, Locale) line: 1
ObjectToNativeSelectConverter.convertToPresentation(NativeSelect, Locale) line: 25

[/b]NativeSelect(AbstractSelect).getValue() line: 584
NativeSelect(AbstractField<T>).getValue() line: 565
NativeSelect(AbstractField<T>).getFieldValue() line: 383
NativeSelect(AbstractField<T>).[color=#ff0000]
convertFromDataSource(Object) line: 836
[/color]

My code (in the middle of the recursion) looks like this, which I believe is correct:

[code]

public Object convertToPresentation(NativeSelect value,
Locale locale)
throws com.vaadin.data.util.converter.Converter.ConversionException {
if (value == null)
return null;
return value.getValue();
}
[/code]

I just delegate my call to the actual object’s getValue() method. The problem is that that call then recurses back to the convertFromDataSource() method.

I may be able to work around this, but it looks like a bona fide 1.0.0.alpha1 bug.