Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Form implements Field, why ?
Hallo,
from javadoc :
Form is a container for fields implementing Field interface
What is the reason behind that ?
For me, it makes things much more complicated. A Form has an itemDatasource and also a value (because its a Field).
But it looks like the getValue setValue of Form is never used. Or is it done to nest Forms ? Could I use a form as another forms field ?
thanks
It is for subforms in one-to-one relationships. You can set the property value of a form, which is assumed to be an item that is used as the data source for the form.
For example, if you have a Person that has a Address field, you could wrap the Person in a BeanItem<Person> and bind it to a form, and then have the address field in a subform bound to a BeanItem<Address>.