cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: dynamic cForms definitions/templates
Date Mon, 21 Jul 2008 09:00:37 GMT

> Thank you, I am actually working this through ;)
> And I have some questions, maybe cause I am new to cForms...


> 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??

It's dynamic because form definition, binding and template are generated 
on the fly by pipelines (i did not include these pipelines in my 
previous mail) and are not static files. Here's the one for the form 
definition :

<map:match pattern="*/cforms/form.xml">
	<map:generate src="cocoon://{1}/schema.rdfs"/>
	<map:transform src="xsl/rdfs2form.xsl">
		<map:parameter name="base" value="{1}"/>
	<map:serialize type="xml"/>

The same applies for binding and templating.

 > What about the src-parameter, it is never used??

The "src" parameter is used in flowscript to access the document to 
modify but I didn't show this processing in the snippet.

You can code and use a loadDocument function to be called this way :

document = loadDocument(src);

>> cocoon.redirectTo(redirect, true);
> After saving data from the form, why we need a redirect?

It's simply to show something to the user :-) . In my case it's an html 
version of the modified document.

Or you can use cocoon.sendPage("myPageToBeShown.html");



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message