joerg       2004/03/18 06:03:44

  Modified:    src/blocks/forms/java/org/apache/cocoon/forms/flow/javascript
                        Form.js
  Log:
  ask both built-in and custom validation (thanks to Alex Kovacs)
  
  Revision  Changes    Path
  1.3       +5 -5      
cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/flow/javascript/Form.js
  
  Index: Form.js
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/flow/javascript/Form.js,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Form.js   13 Mar 2004 03:24:44 -0000      1.2
  +++ Form.js   18 Mar 2004 14:03:43 -0000      1.3
  @@ -113,13 +113,13 @@
           finished = this.form.process(formContext);
           
           // Additional flow-level validation
  -        if (finished && this.form.isValid()) {
  +        if (finished) {
               if (this.validator == null) {
  -              this.isValid = true;
  +                this.isValid = this.form.isValid();
               } else {
  -              this.isValid = this.validator(this.form, bizData);
  -              finished = this.isValid;
  +                this.isValid = this.form.isValid() & 
this.validator(this.form, bizData);
               }
  +            finished = this.isValid;
           }
           
           // FIXME: Theoretically, we should clone the form widget (this.form) 
to ensure it keeps its
  
  
  

Reply via email to