Vaadin 8 ComboBox of POJOs

In Vaadin 7 I was using ComboBox.setContainerDataSource(IndexedContainer). The IndexedContainer contained Items with internal value and a localized presentation string. The internal value was bound to a DAO.

In the documentation of ComboBox and “Binding data to forms” I cannot find an example that handles this (which I find very common) use case.

I do comboBox.setItems(Collection) and I think I need a converter:

The ComboBox ItemType which I specify in the Designer is my POJO with internal and localized presentation.
The DAO needs a String

Do I need a StringToPOJOConverter? Is there an example somewhere?

This is one side of the problem. I solved it by defining a POJO.toString() which returns the localized display string.
But you gave me the idea of feeding the ComboBox a collection of keys. That should work

Can you do a

comboBox.setItemCaptionProvider(c → i18n(c.getKey()); ?