Thansk and here are more details:
d_form1.xml:
  <fd:field id="opis" required="true">
      <fd:label>Opis:</fd:label>
      <fd:datatype base="string"/>
   <fd:length min="2" max="4"/>
 </fd:field>

and my input strig is "a" or "fafaf"

If I don't write anything the result is the same bisede required="true">


Bartosz Zgodziński

----- Original Message ----- 
From: "Marc Portier" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 02, 2004 9:25 PM
Subject: Re: Cocoon forms problem


>
>
> 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/start.do
> > 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(...)).
>
> yes.
> 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",  "/", ...
>
>
> however,
> 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...
>
> regards,
> -marc=
> -- 
> Marc Portier                            http://outerthought.org/
> Outerthought - Open Source, Java & XML Competence Support Center
> Read my weblog at                http://blogs.cocoondev.org/mpo/
> [EMAIL PROTECTED]                              [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to