Use custom Converter for ListSelect

Is it possible to use a custom Converter for the ListSelect Component?
This is what I tried:

[code]
ListSelect ls = new ListSelect();
ls.setConverter((Converter) new MyCustomConverter());

ObjectToDisplay ots = new ObjectToDisplay();

// ls.setConvertedValue(ots ); // Converter is called but ListSelect stays empty
lsConstruction.addItem(ots ); // Did not work
[/code]However, the ListSelect stays empty.

Thanks for any help!

Surely, you can.
I wrote some custom fields like gridField, twinGridField. You can read the code and figure out how to.

https://github.com/jianglibo/first-vaadin


This solved my Problem:

I used setItemCaption() instead of a converter.

final ListSelect ls = new ListSelect ();
final BeanItemContainer<ObjectToDisplay> container = new BeanItemContainer<>(ObjectToDisplay.class, objectList); ls.setContainerDataSource(container);
for (final ObjectToDisplay o : objectList){
    ls.setItemCaption(o, yourDesiredFormatFunction(o));
}