cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Portier <>
Subject Re: Cocoon forms problem
Date Wed, 02 Jun 2004 19:25:30 GMT

Bartosz ZgodziƄski wrote:

> Thanks for Bruno Dumon...
> It's a little bit better but it still doesn't work.
> I make many changes so I will write it again. Sitemap:
>   <map:match pattern="form1.html">
>     <map:aggregate element="site">
>      <map:part src="documents/menu.xml"/>
>      <map:part src="cocoon:/forms/t_form1.xml"/>
>     </map:aggregate>
>         <map:transform src="stylesheets/stylesheet.xsl"/>
>     <map:serialize type="html"/>
>    </map:match>
>    <map:match pattern="forms/*">
>     <map:generate src="forms/{1}" type="jx"/>
>     <map:transform type="form"/>
>     <map:transform type="i18n" label="debug">
>      <map:parameter name="locale" value="en_US"/>
>     </map:transform>
>     <map:transform src="resources/forms-samples-styling.xsl"/>
>     <map:serialize type="xml"/>   <!-- XML !!!!!!!!!!!!!!!!! I don't know
> but may be it's important that it's not html. I've hanged it because I
> agregate it with another xml file and than transform as you can see
> above -->

you shouldn't need to do this, the serializer will be 'automatically' 
eliminated from the pipe in the case you are using it in an aggregation 
(or even xinclude) context

keeping it to html will enable you to get a clear html view in 
non-aggregate mode

>    </map:match>
> so I write URL: http://localhost:8080/test/
> function start()
> {
>      var form = new Form("forms/d_form1.xml");      //d_form1.xml it's a
> form data and t_form1 it's fotm templates
>      form.showForm("form1.html");
> }
> As you see lots of  have been changed, but it works very similar. The page

didn't look into your previous post, so I hope I'm not missing out on 
some details...

> looks the same but the validation doesynt work at all. When I press submit
> buten I see white page (it's because I don't have anything after
> form.showForm(...)).

the flowscript function should not just return (if it does you get the 
blank page syndrome)

try ending at least with some cocoon.redirectTo(path)

where path = anything appropriate to show after all is well "done.html" 
or "home",  "/", ...

you should only get to that effect when you didn't provide any clearly 
invalid data (and your remark on failing validation seems to hint that 
you did try to trigger that specifically)

> Why the validation doesn't work?

well, I missed the detail of the d_form1.xml and any validation it might 
have specified or set programmatically

and you should provide us with the test-data you entered when hoping for 
validation errors to occur...

Marc Portier                  
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                          

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

View raw message