Form implements Field, why ?

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 ?


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 and bind it to a form, and then have the address field in a subform bound to a BeanItem.