Directory

PropertyTranslator - Vaadin Add-on Directory

What PropertyFormatter does for TextFields, PropertyTranslator does for Selects PropertyTranslator - Vaadin Add-on Directory
PropertyTranslator is close relative to PropertyFormatter. As where property formatter only works with string based fields (like TextField), PropertyTranslator can be used with any field. The most apparent use case is with Selects, when identifiers in container datasource and the value in the property datasource don't match. Note, that PropertyTranslator is very similar to a helper class called PropertyConverter in CustomField add-on. If you already have CustomField in your project, you should use that instead. Note, that setting property translator for a field in FormFieldFactory is practical since 6.7.3. Form then sets the property to existing property if it implements Property.Viewer interface as the PropertyTranslator does.
Source Code

PropertyTranslator version 0.0.1
null

PropertyTranslator version 0.0.2
Fixed some issues with null values.