You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by ep...@apache.org on 2003/09/26 18:32:32 UTC

cvs commit: jakarta-turbine-fulcrum/intake/src/java/org/apache/fulcrum/intake/model Field.java

epugh       2003/09/26 09:32:32

  Modified:    intake/src/java/org/apache/fulcrum/intake/model Field.java
  Added:       intake/xdocs changes.xml
  Log:
  adding patch supplied by Colin.  Thanks Colin!
  
  Revision  Changes    Path
  1.1                  jakarta-turbine-fulcrum/intake/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  <?xml version="1.0"?>
  <document>
    <properties>
      <title>Fulcrum Intake</title>
      <author email="epugh@upstate.com">Eric Pugh</author>
    </properties>
  
    <body>
      <release version="Not applicable" date="">
        <action dev="epugh" type="fix">
         The intake validators were fixed so that fields with required=false 
         rules no longer attempt to execute the remaining rules when no
         input is provided.  A minLength > 0 rule is no longer synonymous
         with required=true.  Patch originally supplied by Colin Chalmers
        </action>
       
      </release>
  
    </body>
  </document>
  
  
  
  
  1.2       +5 -4      jakarta-turbine-fulcrum/intake/src/java/org/apache/fulcrum/intake/model/Field.java
  
  Index: Field.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-fulcrum/intake/src/java/org/apache/fulcrum/intake/model/Field.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Field.java	26 Sep 2003 13:52:25 -0000	1.1
  +++ Field.java	26 Sep 2003 16:32:32 -0000	1.2
  @@ -124,7 +124,7 @@
       protected final Method setter;
   
       /** Error message set on the field if required and not set by parser */
  -    protected final String ifRequiredMessage;
  +    protected String ifRequiredMessage;
   
       /** Does this field accept multiple values? */
       protected final boolean isMultiValued;
  @@ -290,6 +290,7 @@
           if (reqRule != null)
           {
               alwaysRequired = new Boolean(reqRule.getValue()).booleanValue();
  +            ifRequiredMessage = reqRule.getMessage();
           }
   
           Rule maxLengthRule = (Rule) field.getRuleMap().get("maxLength");
  @@ -333,7 +334,6 @@
           }
           getter = tmpGetter;
           setter = tmpSetter;
  -        ifRequiredMessage = field.getIfRequiredMessage();
   
           valArray = new Object[1];
       }
  @@ -370,7 +370,8 @@
               }
           }
   
  -        if (pp.containsKey(getKey()))
  +        if (pp.containsKey(getKey()) 
  +                &&  StringUtils.isNotEmpty(pp.getString(getKey())))
           {
               if (isDebugEnabled)
               {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-turbine-fulcrum/intake/src/java/org/apache/fulcrum/intake/model Field.java

Posted by "Daniel L. Rall" <dl...@finemaltcoding.com>.
PLease use meaningful commit messages.  When I scroll back through the CVS 
history with no corresponding code context, this tells me very little about 
the change.

Thanks, Dan


epugh@apache.org wrote:
> epugh       2003/09/26 09:32:32
> 
>   Modified:    intake/src/java/org/apache/fulcrum/intake/model Field.java
>   Added:       intake/xdocs changes.xml
>   Log:
>   adding patch supplied by Colin.  Thanks Colin!
>   
>   Revision  Changes    Path
>   1.1                  jakarta-turbine-fulcrum/intake/xdocs/changes.xml
>   
>   Index: changes.xml
>   ===================================================================
>   <?xml version="1.0"?>
>   <document>
>     <properties>
>       <title>Fulcrum Intake</title>
>       <author email="epugh@upstate.com">Eric Pugh</author>
>     </properties>
>   
>     <body>
>       <release version="Not applicable" date="">
>         <action dev="epugh" type="fix">
>          The intake validators were fixed so that fields with required=false 
>          rules no longer attempt to execute the remaining rules when no
>          input is provided.  A minLength > 0 rule is no longer synonymous
>          with required=true.  Patch originally supplied by Colin Chalmers
>         </action>
>        
>       </release>
>   
>     </body>
>   </document>
>   
>   
>   
>   
>   1.2       +5 -4      jakarta-turbine-fulcrum/intake/src/java/org/apache/fulcrum/intake/model/Field.java
>   
>   Index: Field.java
>   ===================================================================
>   RCS file: /home/cvs/jakarta-turbine-fulcrum/intake/src/java/org/apache/fulcrum/intake/model/Field.java,v
>   retrieving revision 1.1
>   retrieving revision 1.2
>   diff -u -r1.1 -r1.2
>   --- Field.java	26 Sep 2003 13:52:25 -0000	1.1
>   +++ Field.java	26 Sep 2003 16:32:32 -0000	1.2
>   @@ -124,7 +124,7 @@
>        protected final Method setter;
>    
>        /** Error message set on the field if required and not set by parser */
>   -    protected final String ifRequiredMessage;
>   +    protected String ifRequiredMessage;
>    
>        /** Does this field accept multiple values? */
>        protected final boolean isMultiValued;
>   @@ -290,6 +290,7 @@
>            if (reqRule != null)
>            {
>                alwaysRequired = new Boolean(reqRule.getValue()).booleanValue();
>   +            ifRequiredMessage = reqRule.getMessage();
>            }
>    
>            Rule maxLengthRule = (Rule) field.getRuleMap().get("maxLength");
>   @@ -333,7 +334,6 @@
>            }
>            getter = tmpGetter;
>            setter = tmpSetter;
>   -        ifRequiredMessage = field.getIfRequiredMessage();
>    
>            valArray = new Object[1];
>        }
>   @@ -370,7 +370,8 @@
>                }
>            }
>    
>   -        if (pp.containsKey(getKey()))
>   +        if (pp.containsKey(getKey()) 
>   +                &&  StringUtils.isNotEmpty(pp.getString(getKey())))
>            {
>                if (isDebugEnabled)
>                {



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-turbine-fulcrum/intake/src/java/org/apache/fulcrum/intake/model Field.java

Posted by "Daniel L. Rall" <dl...@finemaltcoding.com>.
PLease use meaningful commit messages.  When I scroll back through the CVS 
history with no corresponding code context, this tells me very little about 
the change.

Thanks, Dan


epugh@apache.org wrote:
> epugh       2003/09/26 09:32:32
> 
>   Modified:    intake/src/java/org/apache/fulcrum/intake/model Field.java
>   Added:       intake/xdocs changes.xml
>   Log:
>   adding patch supplied by Colin.  Thanks Colin!
>   
>   Revision  Changes    Path
>   1.1                  jakarta-turbine-fulcrum/intake/xdocs/changes.xml
>   
>   Index: changes.xml
>   ===================================================================
>   <?xml version="1.0"?>
>   <document>
>     <properties>
>       <title>Fulcrum Intake</title>
>       <author email="epugh@upstate.com">Eric Pugh</author>
>     </properties>
>   
>     <body>
>       <release version="Not applicable" date="">
>         <action dev="epugh" type="fix">
>          The intake validators were fixed so that fields with required=false 
>          rules no longer attempt to execute the remaining rules when no
>          input is provided.  A minLength > 0 rule is no longer synonymous
>          with required=true.  Patch originally supplied by Colin Chalmers
>         </action>
>        
>       </release>
>   
>     </body>
>   </document>
>   
>   
>   
>   
>   1.2       +5 -4      jakarta-turbine-fulcrum/intake/src/java/org/apache/fulcrum/intake/model/Field.java
>   
>   Index: Field.java
>   ===================================================================
>   RCS file: /home/cvs/jakarta-turbine-fulcrum/intake/src/java/org/apache/fulcrum/intake/model/Field.java,v
>   retrieving revision 1.1
>   retrieving revision 1.2
>   diff -u -r1.1 -r1.2
>   --- Field.java	26 Sep 2003 13:52:25 -0000	1.1
>   +++ Field.java	26 Sep 2003 16:32:32 -0000	1.2
>   @@ -124,7 +124,7 @@
>        protected final Method setter;
>    
>        /** Error message set on the field if required and not set by parser */
>   -    protected final String ifRequiredMessage;
>   +    protected String ifRequiredMessage;
>    
>        /** Does this field accept multiple values? */
>        protected final boolean isMultiValued;
>   @@ -290,6 +290,7 @@
>            if (reqRule != null)
>            {
>                alwaysRequired = new Boolean(reqRule.getValue()).booleanValue();
>   +            ifRequiredMessage = reqRule.getMessage();
>            }
>    
>            Rule maxLengthRule = (Rule) field.getRuleMap().get("maxLength");
>   @@ -333,7 +334,6 @@
>            }
>            getter = tmpGetter;
>            setter = tmpSetter;
>   -        ifRequiredMessage = field.getIfRequiredMessage();
>    
>            valArray = new Object[1];
>        }
>   @@ -370,7 +370,8 @@
>                }
>            }
>    
>   -        if (pp.containsKey(getKey()))
>   +        if (pp.containsKey(getKey()) 
>   +                &&  StringUtils.isNotEmpty(pp.getString(getKey())))
>            {
>                if (isDebugEnabled)
>                {