Hi André!
Thank you, I am actually working this through ;)
And I have some questions, maybe cause I am new to cForms...
> Dynamic form definition, binding and templating is a very convenient way
> to generate forms according to a DB structure that can change. It could
> perhaps may be more efficient, in a performance point of view, to
> generate files for definition/binding/template each time the DB
> structures gets changed, then to read these files with a simple
> generator. But we never had any performance drawback nor JVM heap space
> problem.
>
> Here's a sitemap snippet :
>
> <map:match pattern="*/*.xhtml">
> <map:call function="myForm">
> <map:parameter name="form"
> value="cocoon:/{1}/cforms/form.xml"/>
> <map:parameter name="binding"
> value="cocoon:/{1}/cforms/binding.xml"/>
> <map:parameter name="show"
> value="{1}/cforms/template.xml"/>
> <map:parameter name="redirect" value="{2}.html"/>
> <!-- document to edit -->
> <map:parameter name="src"
> value="cocoon://{1}/{2}.xml"/>
> </map:call>
> </map:match>
>
> Then, in the flowscript :
>
> var redirect = cocoon.parameters.redirect;
>
> // Form definition
> var form = new Form(cocoon.parameters.form);
Why is this dynamic creation of a form definition? Is there a pipeline behind
form-parameter?
What about the src-parameter, it is never used??
>
> // Binding
> form.createBinding(cocoon.parameters.binding);
>
> var document = ...
>
> // load document
> form.load(document);
>
> // The form to be shown
> form.showForm(cocoon.parameters.show);
>
> //... processing...
>
> //... then
>
> // save document
> form.save(document);
>
> cocoon.redirectTo(redirect, true);
After saving data from the form, why we need a redirect?
>
> André
>
<snip />
Thank you very much. I hope my questions are not 'THAT' silly.
Best regards,
Patrick
--
Psssst! Schon das coole Video vom GMX MultiMessenger gesehen?
Der Eine für Alle: http://www.gmx.net/de/go/messenger03
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]