cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Gauthier - INSERM SIRH <philippe.gauth...@tolbiac.inserm.fr>
Subject Re: Dynamically generated CForm definition
Date Wed, 25 Jul 2007 13:00:52 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Dev at weitling a &eacute;crit&nbsp;:
<blockquote cite="mid46A747A1.1010301@weitling.net" type="cite">
  <pre wrap="">Hi,

  </pre>
  <blockquote type="cite">
    <pre wrap="">I've examined many dynamic forms built-in samples in Cocoon. So,
I'm wondering - does the following pipeline valid:

SQL DB Select query
    |
SQL Transformer
    |
XSLT Transformer converting rows/columns nodes into CForm defitition
    |
Applying CForm XSL Stylesheet, rendering form.

In other words, is it possible to get dynamic CForm definition whithin
pipeline processing?

If it does, "how-to"? Any examples
    </pre>
  </blockquote>
  <pre wrap=""><!---->
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");
  </pre>
</blockquote>
This is disabled in cocoon 2.1.9 at least.<br>
I tried this approche before and it eventually killed the JVM because
each new form compiles a java class.<br>
I solved the problem using a more complex but generic CForm definition,
postponing the instantiation in the template and the binding files.<br>
<blockquote cite="mid46A747A1.1010301@weitling.net" type="cite">
  <pre wrap="">
you only have to do the same for a CForm template if it should be
dynamically created - just replace the call to a file with a call to a
pipeline.

Hope this helped :-)

Florian

---------------------------------------------------------------------
To unsubscribe, e-mail: <a class="moz-txt-link-abbreviated" href="mailto:users-unsubscribe@cocoon.apache.org">users-unsubscribe@cocoon.apache.org</a>
For additional commands, e-mail: <a class="moz-txt-link-abbreviated" href="mailto:users-help@cocoon.apache.org">users-help@cocoon.apache.org</a>


  </pre>
</blockquote>
<br>
Best regards,<br>
<pre class="moz-signature" cols="72">-- 
Philippe Gauthier
INSERM
DRH - SIRH</pre>
</body>
</html>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message