> From: Christopher Oliver
> In that case, the Woody flowscript api needs to be refactored. I'll
> start doing this. If anyone's using the existing one, plan on seeing
> some changes.
>
<snip>
> > From: Bruno Dumon
> >
> >
> >> How would you propose to handle multi-page
> >>forms?
> >>
> >>
> >
> >Something like this:
> >
> >function myfunc()
> >{
> > var form1 = new Form(formDefinition1);
> > var form2 = new Form(formDefinition2);
> > var form3 = new Form(formDefinition3);
> >
> > form1.show(...);
> > form2.show(...);
> > form3.show(...);
> >}
> >
> >and call the myfunc function from the sitemap.
> >
> >Haven't tried this though (I'm using apples), but I think it should
> >work.
I don't like it that we have to create a new form instance for each new
page. There must be a better solution IMO. For example I'd like to bind
a bean to my form using the binding API and I'd like to collect my data
over more than one page the function would look like this (from memory):
function myFunc() {
var myBean = getMyBean();
var form1 = new Form(formDefinition1);
form.load( myBean );
form.send( "myPage.html" );
form.finish();
var form2 = new Form(formDefinition2);
form.load( myBean );
form.send( "myPage.html" );
form.finish();
...
}
Maybe you have better ideas how to solve this but I don't like the
function above because I always have to write to my bean. What happens
if the user decides to cancel the operation on the last form? Second,
the whole function is to verbose and third I always have to instantiate
a new form?
Any better solutions? What do you think?
Cheers,
Reinhard