cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeroen Reijn <>
Subject Re: Aggregation and CForms: redisplay
Date Thu, 07 Dec 2006 10:26:35 GMT
Hi Niclas,

It's best to do it the other way around.
I've been using this method for quite some time.

What you want to do is something like:

<map:match pattern="**/reaction.html">
    <map:call function="handleForm">
       some parameters

Then let the the showform call the form template-*, but instead of just 
generating the form, you could aggregate all other content and add the 
form as a part of your aggregate.

<map:match pattern="form-template-*">
   <map:aggregate element="root">
     <map:part src="cocoon://jxform/{1}-template.xml"/>
   <map:transform src="yourdefaultstyling.xsl"/>
   <map:serialize type="html"/>

<map:match pattern="jxform/*-template.xml">
   <map:generate type="jx" src="forms/{1}-template.xml"/>
   <map:serialize type="xml"/>

I hope this helps you out.

Kind regards,

Jeroen Reijn

ZongoZongo wrote:
> Hi
> I have an application, that is aggregated of several regions like
> navigation, header etc.
> In the main area I have some CForms. Some of the fields are required.
> The Problem is as follows: If one field is not filled, the form is beeing
> redisplayed. But ONLY the form. Navigation, header etc. are not shown.
> Some sitmemap extractions:
> 			<map:match pattern="form-template-*">
> 				<map:generate type="jx" src="forms/{1}-template.xml"/>
> 				<map:transform type="browser-update"/>
> 				<map:transform type="i18n">
>         	 		<map:parameter name="locale" value="en-US"/>
>        			</map:transform>
>       			<map:transform src="forms-samples-styling.xsl"/>
>       			<map:select type="ajax-request">
>       				<map:when test="true">
>       					<map:serialize type="xml"/>
>       				</map:when>
>       				<map:otherwise>
>       					<map:serialize type="xhtml"/>
>       				</map:otherwise>
>       			</map:select>
> 			</map:match>
> 			<map:match pattern="*">
> 				<map:aggregate element="site">
> 					<map:part element="navigation" src="cocoon:/navigation"
> strip-root="true"/>
> 					<map:part src="cocoon:/main-{1}" element="main"/>
> 					<map:part element="header" src="header.xml" strip-root="true"/>
> 				</map:aggregate>
> 				<map:transform type="xslt" src="stylesheets/finalize.xsl"/>
> 				<map:serialize type="html"/>
> 				</map:match>
> 			</map:pipeline>
> the pipelinecall from the flowscript:
> form.showForm("form-template-objectDefinition");
> The Problem is, that Cocoon only redisplays the main area, because the
> pipelinecall to the formtemplate from the flowscript doesnt match the
> aggregator.
> The question is. How must the aggregator und the matchers be designed, that
> the redisplay of a forms shows all parts of the aggregation?
> Or is there a possibility to tell Cocoon, which pipline has to be called in
> the case of a redisplay.
> Greetings,
> Niclas

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

View raw message