Hi All,
I’ve been looking everywhere for an example of a form based on a Collection<>.
Example (raw pojo data):
public class Vehicle {
Long id;
String name; //example "car"
Collection<String> manufacturers; //example: {ferrari, toyota, volvo, saab}....
}
[i]
[/i]A more complicated (and “life like” example) would have Collection… we need to acknowledge this but for simplicity we will use Collection for this (future) example.
I have explored several options, but none of them appear to work. In particular a custom FormFieldFactory, which could be used to create Form for a Collection, which is then populated with other Fields (which might be a Form, TextField…) but this leads down a path where you have to know the propertyId of the subForm before it can be added…).
Anyway, so how can the above ‘Vehcicle’ be used in a form… listing all the manufacturers* in their own unique Fields.
Cheers