|
From: Keith D. <kd...@cs...> - 2004-06-14 16:41:49
|
I recently committed support for "CompoundFormModels" for the rich client form / data binding / validation framework, where a CompoundFormModel is a FormModel that aggregate other form models. The use cases / requirements addressed by this capability are: - A wizard or other multi-page dialog contains multiple logical "pages", where each page (generally) displays a form for editing. Thus: o It should be possible for form validation listeners to subscribe only to a single page's form fields, for local results reporting on that page. o It should be easy to commit all edits on all forms models to the domain layer on a single bulk "submit" - e.g calling commit on the parent, compound form model should trigger commits on all child page models. o It should be impossible to submit unless all aggregated page models are free of validation errors. o It should be easy to commit or revert a single page's edits. o It should be easy to reuse the same compound form instance with a different backing form object of the same type. So the general cardinality of these objects for a wizard would be: o One CompoundFormModel per wizard o One to many MutableFormModels, one for each wizard page I believe what I just checked in accomplishes these goals. I've updated the sample app to illustrate (as always.) I've also renamed a few framework classes to better document the separation between a "CompoundForm", and a single "FormPage." Very best regards, Keith |