struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwinterfe...@apache.org
Subject cvs commit: jakarta-struts/contrib/validator/src/share/com/wintecinc/struts/taglib/html JavascriptValidatorTag.java
Date Sun, 16 Dec 2001 21:37:12 GMT
dwinterfeldt    01/12/16 13:37:12

  Modified:    contrib/validator/src/share/com/wintecinc/struts/taglib/html
                        JavascriptValidatorTag.java
  Log:
  The getJavascriptBegin method always appended the methods even if it was null.  Now it has
the Javascript return true if there aren't any Javascript validation methods to perform.
  
  Revision  Changes    Path
  1.5       +7 -1      jakarta-struts/contrib/validator/src/share/com/wintecinc/struts/taglib/html/JavascriptValidatorTag.java
  
  Index: JavascriptValidatorTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/contrib/validator/src/share/com/wintecinc/struts/taglib/html/JavascriptValidatorTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JavascriptValidatorTag.java	2001/10/18 21:56:25	1.4
  +++ JavascriptValidatorTag.java	2001/12/16 21:37:12	1.5
  @@ -379,7 +379,13 @@
          sb.append("	      if (bCancel) \n");
          sb.append("	 	return true; \n");
          sb.append("	      else \n");     
  -       sb.append("	 	return " + methods + "; \n");
  +       
  +       // Always return true if there aren't any Javascript validation methods
  +       if (methods == null || methods.length() == 0)
  +          sb.append("	 	return true; \n");
  +       else
  +          sb.append("	 	return " + methods + "; \n");
  +          
          sb.append("	 } \n\n");
          
          return sb.toString();
  
  
  

--
To unsubscribe, e-mail:   <mailto:struts-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@jakarta.apache.org>


Mime
View raw message