Bruno,

When did you changed that of the request attr?
I'm working with a very recent version of Woody of this week.

--------
David

-----Mensaje original-----
De: Bruno Dumon [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 06 de noviembre de 2003 18:11
Para: [EMAIL PROTECTED]
Asunto: RE: Woody custom validation

On Thu, 2003-11-06 at 17:33, Carmona Perez, David wrote:
> Another issue,
>
> 
>
> While in the provided example form.isValid is called?
>
> Isn't always the form valid when showForm() returns?

Not necessarily, the normal form processing cycle can be interrupted
(e.g. from an eventhandler for action widget) by calling
form.endProcessing()

I don't know if that can happen in that sample though.

By reading the snippet you posted, I also saw that the form is being put
in a request attribute, which is not needed anymore. I've removed that
in CVS.

>
> 
>
> function form1(form) {
>
>     var locale = determineLocale();
>
>     var model = form.getModel();
>
>     model.email = "[EMAIL PROTECTED]";
>
>     model.somebool = true;
>
>     model.account = 2;
>
>     model.cowheight = 4;
>
>     model.number1 = 1;
>
>     model.number2 = 3;
>
>     model.birthdate = new java.util.Date();
>
>    
>
>     model.contacts[0].firstname = "Jules";
>
>     model.contacts[1].firstname =  "Lucien";
>
>     model.contacts[2].firstname = "Chris";
>
>     model.drinks = ["Jupiler", "Coca Cola"];
>
> 
>
>     form.locale = locale;
>
>     form.showForm("form1-display-pipeline");
>
>     print("submitId = " + form.submitId);
>
>     if (form.isValid) {      
> <---------------------------------------------------------------------------------------------doubt
>  here
>
>       print("visa=" + model.visa); 
>
>     } else {
>
>       print("Form is not valid");
>
>     }
>
>     // Store the form as a request attribute, as the view is not
>
>     // flow-aware.
>
>     cocoon.request.setAttribute("form1", form.getWidget());
>
>    cocoon.sendPage("form1-success-pipeline");
>
> }

--
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[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