Reinhard Poetz wrote:

From: Sylvain Wallez


This is fine and already works today.
But how do we handle data binding, suppose you have a 10 pages form. I don't want to do this explicitly for each form [this means writing 10 times load(...) and 10 times save(...)] or is this the way we should go?


Mmmh... is this a "composite binding" on a "composite form" composed of several individual forms?

Or maybe just a helper JS library for linear multi-form wizards to which you would just give the list of definitions, views and bindings.



Some mails ago you introduced a wizard object, maybe we can use it:


function myWizard() {
 var myBean = new BlaBla(); // get values from your backend
 var wiz = new Wizard();
 wiz.setForm( "form1", new Form( "form1.xml" ), [myBean] );
 wiz.setForm( "form1", new Form( "form1.xml" ), [myBean] );

 wiz.getForm("form1").showView( "myForm1Pipeline", {} );
 wiz.getForm("form1").showView( "myForm1Pipeline", {} );
}


interface Wizard() { void setForm(String id, Form form, Object[] binding); Form getForm(String id); }

... I think I get it slowly, don't I?


Yep ;-)


The wizard I was thinking of was generic and not woody-related, so the one you outline above can be a FormWizard built on top of the generic Wizard class.

Sylvain

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com




Reply via email to