You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Dimas51 <di...@rambler.ru> on 2007/07/25 14:06:28 UTC
Dynamically generated CForm definition
Greetings
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?
--
Best regards,
Dimas mailto:dimas51@rambler.ru
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Dynamically generated CForm definition
Posted by Derek Hohls <DH...@csir.co.za>.
This is VERY bad news for me - I am using Cocoon 2.1.8 and the
var form = new Form("cocoon:/createCFormDefinition");
approach has always worked for me (not sure what JVM problems
this created and whether or not they could be circumvented some
other way).
Can anyone suggest a practical approach to take when upgrading
(short of rewriting large chunks of code)?
>>> Philippe Gauthier - INSERM SIRH <ph...@tolbiac.inserm.fr> 2007/07/25 03:00 PM >>>
Dev at weitling a écrit : Hi, 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 whithinpipeline 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. Butyou 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.
you only have to do the same for a CForm template if it should bedynamically created - just replace the call to a file with a call to apipeline.Hope this helped :-)Florian---------------------------------------------------------------------To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.orgFor additional commands, e-mail: users-help@cocoon.apache.org
Best regards,
-- Philippe GauthierINSERMDRH - SIRH--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org
--
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html
For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
CallCentre@csir.co.za.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean.
Re: Dynamically generated CForm definition
Posted by Niels van Kampenhout <n....@hippo.nl>.
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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Dynamically generated CForm definition
Posted by Dev at weitling <de...@weitling.net>.
Hi,
> 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
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");
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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org