Search code examples
javavaadinvaadin7

BeanFieldGroup in Vaadin with a List<String> as comma separated entry


I have the following POJO

public class Person {
  private String name;
  private List<String> emails;

 // getter & setter
}

in my form I use the BeanFieldGroup to bind the properties to the form.

But how can I done it easily, that the emails field can be entered as comma separated entries and this is then converted to a List of Strings ?

I assume I need a Converter for this, but i cannot find any method in the FieldGroup for doing this.


Solution

  • In case of FieldGroup you need to use FieldGroupFieldFactory. You can find example in documentation