forms with complex layout

Hi,

how can a form like that (referenced in the Vaadin customers section) → http://vaadin.com/image/journal/article?img_id=238876&t=1288076890776 be accomplished best? I dont mean the tab feature but only the layout of the form itself.

Could be a GridLayout but how to get those fieldset groupings? Dont want to waste too much time by using the wrong approach. BTW it would be very nice if there would be some more complex form examples in Sampler. SmartGWT and friends have great examples for various forms… complex and simple ones.

Marc

One example where the fields are placed in a GridLayout is
in the Sampler
. Alternatively, you could even have an empty attachField() method and then compose the layout in whichever way you want out of what getField(propertyId) gives after setting the data source.

If you don’t mind creating the layout in HTML, just use CustomLayout; the fields are automatically placed at “slots” with the same name as the property id for a field.

If the fields of the form are not at all in the layout of the form, reusing the form requires some care - in that case, I would recommend that your FormFieldFactory always returns the same field instance for a property to avoid “leaks”.

Making complex form layouts easier is on the list of things to improve in future versions.

thanks for your input. Another valuable source for a bit more complex forms and resulting binding is your very own CustomField addon examples. Studied the sources and they are really useful. So useful that this should go into core IMO (as the comments on the plugin page state).