How can I have a TabSheet with multiple tabs that are all in the same Form?
TabSheet does not implement Field and can therefore not be added to a Form.
You might be able to do this with by overriding the attachField() method of Form and placing the fields in different sub-layouts (that can be FormLayouts) that are on different tabs. However, the TabSheet normally only loads to the UI the tabs that have been seen by the user. This might or might not interfere with what you try to achieve.
Is there a reason why having separate forms for each tab is not an option? Each of them could show a subset of the fields, and you could still trigger the validation and then commit for all the forms based on some user action.
What I’m trying to achieve is for example a parent-child update page. I want the parent (such as order) attributes on the first tab and then tables with different kinds of children (order lines) on separate tabs. This means all the data belongs to the same hierarchy, and I only need to interact with the top node (i.e. DAO.save(parent)).
I haven’t considered multiple “synchronized” forms yet. I’ll have to look into what that means in practice.
pre-Vaadin we have pages with 10 tabs and some 15 child relationships. I’d like to avoid 10-20 forms per page…