BeanItem and collections

Hi,

This is how data binding for my simple form works:

[code]
class Person{
String firstName;
String lastName
Address address;
}
class Address{
String street;
String zipCode;
String city;
}

item = new BeanItem(person);
item.addNestedProperty(“address.city”);
fieldGroup = new FieldGroup();
fieldGroup.bind(city, “address.city”);
fieldGroup.setItemDataSource(item);
fieldGroup.bindMemberFields(this);
[/code]Instead of Address address; I now have List addresses;
I am creating the form fields dynamically with buttons to “add new address” and “delete this address”.
What would be the best way to handle the binding?

Thanks,
Roland

Matti’s
https://github.com/viritin/viritin/blob/master/src/test/java/org/vaadin/viritin/it/EditPerson.java
might give you sime pointers.

HTH

Niki