cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: woody2.js: custom validation issue in cocoon-2.1.2 to 2.1.4
Date Thu, 18 Mar 2004 17:39:18 GMT
Joerg Heinicke wrote:

>Sylvain Wallez <sylvain <at>> writes:
>>>I have committed it this way to the forms block in CVS:
>>>if (finished) {
>>>   if (this.validator == null) {
>>>       this.isValid = this.form.isValid();
>>>   } else {
>>>       this.isValid = this.form.isValid()
>>>                      & this.validator(this.form, bizData);
>>>   }
>>>   finished = this.isValid;
>>>Should work as well. Can you test it?
>>This was written that way on purpose, in order for the flow-level 
>>validation do be assured that the form was valid and not to care about 
>>it. This change means that flow-level validation has now to check if the 
>>form is valid, which may break some of the existing uses.
>IMO it's really bad usability to present the user the validation results in
>multiple steps. I have the same problem at the moment for the
>wd:validation/wd:javascript, this is also only executed after the form itself is
>valid. If you add in the form1.xml a @required="true" to the email and make a
>duplicate entry for the firstname, you first have to fill all emails to get the
>validation on unique names running.

I see your point. So we may change the semantics of validators and say 
that they're *always* called and should take care that they may act on 
invalid widgets.

>IMO it must be possible to get a form validated completely in one submit, not
>"fixing the last issue, submit, ... again three errors :-(".

That totally makes sense.

>>Note that I plan to remove this feature in CForms as we can now add 
>>arbitrary validators on the Form itself.
>"this feature" is this.validator? What exactly does "this" refer to at the
>moment? And later it will be this.form.validator or
>this.form.addValidator(validator) or something similar?

The "this" refers to the fact that we can add a validator at the 
flowscript level. As we can add regular WidgetValidators on the Form 
(and on any widget, BTW), there's no need anymore for this flow-specific 


Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }

View raw message