cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans>
Subject Re: Pipeline global variables
Date Sun, 17 Oct 2004 21:20:32 GMT
I haven't used XSP so i can't comment on your pipeline structure, but 
you could use CForms, flow (and a sniff of JXTemplates perhaps) to 
achieve your goals.

Have a look at the forms block and the examples, below is just a 
generalized view of how things work.

This might be a big knowledge jump for you, but have a look how cleanly 
Cocoon handles this standard situation.

<map:match pattern="startforms">
      <map:call function="public_startforms">

	 (then in flow)
	var formbean = new;
	//create the form
	var form1 = new Form("form1Model.xml");
         //and the binding
         //display form
	//the form contents is stored in the bean;
	//after submit here

	//now show the second form
	var form2 = new Form("form2Model.xml");
	//load the bean values of the first form in the second one
         //after submit


Phillip Nicolson wrote:
> Can anyone tell me if the following is possible? 
> I have a web page containing two frames, outerFrame and innerFrame, both
> have associated pipelines. 
> Once outerFrame has loaded the innerFrame loads. 
> outerFrame contains a form with a number of fields - what I need to do
> is set variables as I pass through the pipeline for the outerFrame that
> I can then pick up and use as I pass through the pipeline for the
> innerFrame
> Within my sitemap I would like to create a number of global variables -
> I know this can be done very easily. 
> However I would like to be able to set the value of these variables in
> one pipeline and use them in another, something along the lines of:
> <global-variables>
>   <global_activity_key />
> </global-variables>
> <map:match pattern="outerFrame.html">            
>   <map:act type="abc" />
>     <map:generate src="web/xsp/workflow-main.xsp" type="serverpages"
> label="000" />
>       <map:transform src="............xsl">       
>         <map:parameter name="use-request-parameters" value="true"/>
>         <!-- Add the action params -->
>         <map:parameter name="action"  value="{action}"/>
>         <map:parameter name="global:global_activity_key" 
> value="{activity_key}"/>
>       </map:transform>
>         <!-- Serialize as HTML -->
>         <map:serialize type="html" />
>       </map:match>
> <map:match pattern="innerFrame.html"> 
>   <map:generate src="web/xsp/.....xsp" type="serverpages" label="000" />
>         <map:transform src="web/xsl/......xsl">       
>         <map:parameter name="use-request-parameters" value="true"/>
>           <!-- Add the action params -->
>           <map:parameter name="action"  value="{action}"/>
>           <map:parameter name="activity_key" 
> value="{global:global_activity_key}"/>
>         </map:transform>
>         <!-- Serialize as HTML -->
>         <map:serialize type="html" />
>         </map:match>
> Is this possible, or do I need to think of a different approach?
> Any suggestions will be much appreciated.
> thanks

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

View raw message