cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabriel Gruber <>
Subject Re: RE: dynamic cForm generation
Date Wed, 17 Jun 2009 20:08:28 GMT
Hi Patrick!

In order to dynamically create a JX-Template you have to make sure through 
your pipeline machinery, that you are *NOT* using jx-template generator to 
create the initial form template. 

what you can do however is to delegate the creation to another pipeline, 

            <!-- generate Form Template here without using JX -->
            <map:match pattern="getReportFilterFormTemplate">
                <map:generate type="file" 
                <map:transform type="include"/>
                <map:serialize type="xml"/>
            <!-- Report Form-->
            <map:match pattern="forms/rp/testReportFilter">
                <map:generate type="jx" 
src="cocoon:/getReportFilterFormTemplate" label="raw"/>
                <map:transform type="browser-update"/>
                    <map:select type="ajax-request">
                        <map:when test="true">
                            <map:select type="request-parameter">
                                <map:parameter name="parameter-name" 
                                <map:when test="iframe">
                                    <map:serialize type="xhtml"/><!-- this 
is really important !!!! -->
                                    <map:serialize type="xml"/>
                            <map:serialize type="html"/>

Its crucial to NOT use within that 2nd pipeline. you can use other 
technologies like include-transformer or xslt to accomplish building your 
form template xml on the fly...

Mag. Gabriel Gruber
Senior Consultant
Workflow EDV GmbH, Dannebergplatz 6/23, A-1030 Wien

"Patrick Heiden" <> 
05.06.2009 16:08
Please respond to


Re: RE: dynamic cForm generation

Hi Robby,

thanks for your link!
But I am afrait that form-libs will not solve my problem:

"With this feature, it is now possible to define libraries of form 
definitions and bindings. Specific support for templates was intentionally 
left out because of the frequently changing and unstructured nature of 

Also I was not able to see WHY form-libs are suitable for dynamic 
form-generation (especially because ft's are not supported!).

When I think it over (as a first-shot) it will be a better way to generate 
the fd-/ft-/ and fb-files out of the domainlayer (according to some change 
needed) and save the resulting XML-files inside my block-structure. But 
upfront I was trying not to reinvent the wheel and generate XML by myself 


-------- Original-Nachricht --------
> Datum: Fri, 5 Jun 2009 14:25:34 +0200
> Von: "Robby Pelssers" <>
> An:
> Betreff: RE: dynamic cForm generation

> We've done the same thing in the past but back then they were already
> working on a form library.
> Why don't you see if this will fill your needs.
> Robby
> -----Original Message-----
> From: Patrick Heiden [] 
> Sent: Friday, June 05, 2009 2:08 PM
> To:
> Cc:
> Subject: Re: dynamic cForm generation
> Hello together!
> Has anybody (maybe Rashel Shehata him/herself) solved the issue 
> in
> There Rashel tries to generate fd and ft dynamically and gets the
> following error:
> org.apache.cocoon.forms.FormsRuntimeException: The template cannot find 
> form object
> I am stuck at the same point and very interested in solutions!
> Best regards,
> Patrick
> -- 
> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> Jetzt freischalten unter
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter

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

View raw message