cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beatejung <>
Subject Re: CForms Help
Date Mon, 02 May 2005 16:41:55 GMT

hi  mathew,

Am Montag, 2. Mai 2005 18:19 schrieb Matthew Ceroni:
> Quick question about CForms (since the example on doesn't
> seem complete).
> I am using Cocoon 2.1.
> The example on the website sets up the main pipeline as such.
> <map:match pattern="registration-display-pipeline">
>   <map:generate src="forms/registration_template.xml"/>
>   <map:transform type="forms"/>
>   <map:transform type="i18n">
>     <map:parameter name="locale" value="en-US"/>
>   </map:transform>
>   <map:transform src="resources/forms-samples-styling.xsl"/>
>   <map:serialize/>
> </map:match>
> My question is, how does this pipeline know what model file to use. (since
> it only specifies the template).
surely you find something like

  <map:flow language="javascript">
        <map:script src="cont/useradm.js"/>

in your sitemap. look at this code. you will find included something like


look at this file. there you will find a function called handleForm.

the pipeline you found is called by the flowscript function. you get to the 
pipeline using something like

     <map:match pattern="handle-*">
		        <map:call function="handleForm">
         		<map:parameter name="function" value="getAdminForms"/>
			<map:parameter name="form-definition" 
        		<map:parameter name="documentURI" value="cocoon:/get-{1}-data"/>
         		<map:parameter name="bindingURI" value="xml/newuser_bind_xml.xml"/>

you will find it in your sitemap.

in this example the function getAdminForms is called by the flow. look at your 
function in the flowscript you registered by <map:flow .....> for function 
which is called in your pipeline.

model file name  is given to the function by the parameter form-definition.



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

View raw message