Philippe Gauthier - INSERM SIRH wrote:
Dev at weitling a écrit :
<snip/>
In other words, is it possible to get dynamic CForm definition whithin
pipeline processing?
If it does, "how-to"? Any examples
I didn't try it, yet, but it should be no problem.
In the flowscript you create your Forms object like this:
var form = new Form("myDefinition.xml");
which usually loads the definition from the file myDefinition.xml. But
you may also use any source Cocoon supports i.e. cocoon:, context: ...
So when you put your first three steps in a pipeline and call it like this:
var form = new Form("cocoon:/createCFormDefinition");
This is disabled in cocoon 2.1.9 at least.
I tried this approche before and it eventually killed the JVM because
each new form compiles a java class.
I solved the problem using a more complex but generic CForm definition,
postponing the instantiation in the template and the binding files.
I have been using dynamically generated form definitions since version
2.1.5, so it should work. I do remember that 2.1.8 contained a bug which
affected dynamic generation of forms, but this was fixed in 2.1.9. Can't
find the corresponding Jira issue though.
For an example, see my (very old) schema2cocoonforms wiki page [1]
Regards,
Niels
[1] http://wiki.apache.org/cocoon/Schema2CocoonForms
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]