Form binding: How to bind a list of Strings


I have a class with a Set of Strings e.g. paths or protocols … how can I bind it to a form? Is there a way to dynamically create textfields based on the amount of values?

What’s the best and simplest solution ? Are there any code samples around?

public class RouteDetails {

    private String id;
    private String name;
    private Set<String> paths;
    private Set<String> protocols;
    private Set<HttpMethod> methods;


You can bind Set of Strings to a field that returns set of Strings, i.e. something that implements [MultiSelect]
( and is parametrized with String. This can be build in field component (e.g. Grid as MultiSelect) or your own. E.g. you can implement custom field by extending text area where you input list of comma separated strings. Field will have internal logic parsing the String to sub Strings, i.e. returning Set of Strings.