cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/forms/samples/forms sitemap.xmap customvalidationdemo_form.xml customvalidationdemo_template.xml
Date Thu, 06 May 2004 14:23:05 GMT
vgritsenko    2004/05/06 07:23:04

  Modified:    .        status.xml
               src/blocks/forms/samples sitemap.xmap welcome.xml
               src/blocks/forms/java/org/apache/cocoon/forms/flow/javascript
                        Form.js
               src/blocks/forms/java/org/apache/cocoon/forms/flow/javascript/v2
                        Form.js
               src/blocks/forms/java/org/apache/cocoon/forms/flow/javascript/v3
                        Form.js
               src/blocks/forms/samples/forms sitemap.xmap
  Removed:     src/blocks/forms/samples/flow customvalidationdemo.js
               src/blocks/forms/samples/forms customvalidationdemo_form.xml
                        customvalidationdemo_template.xml
  Log:
  Remove flow level custom validators
  http://marc.theaimsgroup.com/?t=108091920700001&r=1&w=2
  
  Revision  Changes    Path
  1.313     +5 -2      cocoon-2.1/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/status.xml,v
  retrieving revision 1.312
  retrieving revision 1.313
  diff -u -r1.312 -r1.313
  --- status.xml	5 May 2004 21:39:28 -0000	1.312
  +++ status.xml	6 May 2004 14:23:04 -0000	1.313
  @@ -212,6 +212,9 @@
     <changes>
   
    <release version="@version@" date="@date@">
  +   <action dev="VG" type="remove">
  +     CForms: Remove custom flow level forms validators.
  +   </action>
      <action dev="BD" type="add">
        Supersonic block added: the Supersonic Tour of Apache Cocoon.
        Tutorial/example app focused on the Power Trio: Pipelines, Flow, Forms.
  @@ -233,7 +236,7 @@
        inside the servlet's context.
      </action>
      <action dev="MPO" type="update">
  -     [cforms] change to generated instance xml &lt;fi:form&gt;.  
  +     CForms: Change to generated instance xml &lt;fi:form&gt;.  
        Nested widgets are now grouped in &lt;fi:widgets&gt; and no longer in &lt;fi:children&gt;.
        This aligns with other container-widgets.
      </action>
  
  
  
  1.8       +0 -9      cocoon-2.1/src/blocks/forms/samples/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/samples/sitemap.xmap,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- sitemap.xmap	9 Apr 2004 11:01:34 -0000	1.7
  +++ sitemap.xmap	6 May 2004 14:23:04 -0000	1.8
  @@ -70,7 +70,6 @@
       <map:script src="flow/binding_example.js"/>
       <map:script src="flow/upload_example.js"/>
       <map:script src="flow/registration.js"/>
  -    <map:script src="flow/customvalidationdemo.js"/>
       <map:script src="flow/bindings.js"/>
       <map:script src="flow/form_model_gui.js"/>
       <map:script src="flow/htmlarea.js"/>
  @@ -303,14 +302,6 @@
          </map:select>
        </map:match>
        
  -     <!--
  -        | Custom validation example
  -         -->
  -
  -     <map:match pattern="customvalidationdemo">
  -       <map:call function="customValidationDemo"/>
  -     </map:match>
  -
        <!--
           | HTMLArea example
           -->
  
  
  
  1.8       +1 -2      cocoon-2.1/src/blocks/forms/samples/welcome.xml
  
  Index: welcome.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/samples/welcome.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- welcome.xml	20 Apr 2004 19:38:16 -0000	1.7
  +++ welcome.xml	6 May 2004 14:23:04 -0000	1.8
  @@ -37,7 +37,6 @@
     <sample name="Car selector" href="carselector">Illustrates programmatically changing
selectionlists.</sample>
     <sample name="Country selector" href="countryselector">Illustrates programmatically
changing flow-jxpath selectionlists.</sample>
     <sample name="Upload" href="upload">Shows an upload widget used with Flowscript</sample>
  -  <sample name="Custom validation" href="customvalidationdemo">Shows custom validation
and messages widget.</sample>
     <sample name="Form Model GUI" href="form_model_gui.flow">Illustrates the use of
Class, New, Struct, and Union.</sample>
     <sample name="HTMLArea" href="htmlarea">A simple form using the HTML editor widget.</sample>
     <sample name="Aggregate" href="aggregate/example">Aggregate field examples</sample>
  
  
  
  1.8       +2 -14     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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Form.js	27 Apr 2004 12:06:49 -0000	1.7
  +++ Form.js	6 May 2004 14:23:04 -0000	1.8
  @@ -37,7 +37,6 @@
           src = resolver.resolveURI(uri);
           this.form = formMgr.createForm(src);
           this.binding = null;
  -        this.validator = null;
           this.eventHandler = null;
           // TODO : do we keep this ?
           this.formWidget = new Widget(this.form);
  @@ -71,10 +70,6 @@
    *
    * This uses some additionnal propertied on the form object :
    * - "locale" : the form locale (default locale is used if not set)
  - * - "validator" : additional validation function. This function receives
  - *   the form object as parameter and should return a boolean indicating
  - *   if the form handling is finished (true) or if the form should be
  - *   redisplayed again (false)
    *
    * On return, the calling code can check some properties to know the form result :
    * - "isValid" : true if the form was sucessfully validated
  @@ -112,15 +107,8 @@
           org.apache.cocoon.components.flow.FlowHelper.setContextObject(objectModel, bizData);
   
           finished = this.form.process(formContext);
  -        
  -        // Additional flow-level validation
           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;
  -            }
  +            this.isValid = this.form.isValid();
           }
           
           // FIXME: Theoretically, we should clone the form widget (this.form) to ensure
it keeps its
  
  
  
  1.6       +0 -3      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/flow/javascript/v2/Form.js
  
  Index: Form.js
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/flow/javascript/v2/Form.js,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Form.js	23 Apr 2004 16:04:09 -0000	1.5
  +++ Form.js	6 May 2004 14:23:04 -0000	1.6
  @@ -75,7 +75,6 @@
    * redisplayed. If setBookmark() is not called, this is implicitly set to 
    * the beginning of showForm().
    */
  -
   Form.prototype.setBookmark = function() {
       return (this.local_.webContinuation = cocoon.createWebContinuation());
   }
  @@ -83,7 +82,6 @@
   /**
    * Returns the bookmark continuation associated with this form, or undefined
    * if setBookmark() has not been called.
  - * 
    */
   Form.prototype.getBookmark = function() {
       return this.local_.webContinuation;
  @@ -96,7 +94,6 @@
    * @parameter ttl Time to live (in milliseconds) for the continuation created
    * @returns The web continuation associated with submitting this form
    */
  -
   Form.prototype.showForm = function(uri, fun, ttl) {
       if (!this.getBookmark()) {
           this.setBookmark();
  
  
  
  1.2       +1 -1      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/flow/javascript/v3/Form.js
  
  Index: Form.js
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/flow/javascript/v3/Form.js,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Form.js	29 Apr 2004 10:35:30 -0000	1.1
  +++ Form.js	6 May 2004 14:23:04 -0000	1.2
  @@ -168,4 +168,4 @@
   
   Form.prototype.removeAttribute = function(name) {
       this.form.removeAttribute(name);
  -}
  \ No newline at end of file
  +}
  
  
  
  1.3       +0 -9      cocoon-2.1/src/blocks/forms/samples/forms/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/samples/forms/sitemap.xmap,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- sitemap.xmap	11 Mar 2004 16:25:47 -0000	1.2
  +++ sitemap.xmap	6 May 2004 14:23:04 -0000	1.3
  @@ -71,7 +71,6 @@
       <map:script src="flow/binding_example.js"/>
       <map:script src="flow/upload_example.js"/>
       <map:script src="flow/registration.js"/>
  -    <map:script src="flow/customvalidationdemo.js"/>
       <map:script src="flow/bindings.js"/>
       <map:script src="flow/form_model_gui.js"/>
       <map:script src="flow/htmlarea.js"/>
  @@ -304,14 +303,6 @@
          </map:select>
        </map:match>
        
  -     <!--
  -        | Custom validation example
  -         -->
  -
  -     <map:match pattern="customvalidationdemo">
  -       <map:call function="customValidationDemo"/>
  -     </map:match>
  -
        <!--
           | HTMLArea example
           -->
  
  
  

Mime
View raw message