struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgra...@apache.org
Subject cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html JavascriptValidatorTag.java
Date Mon, 20 Jan 2003 06:00:49 GMT
dgraham     2003/01/19 22:00:48

  Modified:    src/share/org/apache/struts/taglib/html
                        JavascriptValidatorTag.java
  Log:
  Don't print html comments around script in xhtml mode.
  
  Revision  Changes    Path
  1.22      +9 -9      jakarta-struts/src/share/org/apache/struts/taglib/html/JavascriptValidatorTag.java
  
  Index: JavascriptValidatorTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/JavascriptValidatorTag.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- JavascriptValidatorTag.java	17 Jan 2003 06:09:17 -0000	1.21
  +++ JavascriptValidatorTag.java	20 Jan 2003 06:00:48 -0000	1.22
  @@ -544,22 +544,22 @@
               sb.append("<![CDATA[\r\n");
           }
           
  -        if ("true".equals(htmlComment)) {
  +        if (!this.isXhtml() && "true".equals(htmlComment)) {
               sb.append(htmlBeginComment);
           }
           sb.append("\n     var bCancel = false; \n\n");
   
  -        if (methodName == null || methodName.length() == 0)
  +        if (methodName == null || methodName.length() == 0) {
               sb.append(
                   "    function validate"
                       + name
                       + "(form) {                                                       
           \n");
  -        else
  +        } else {
               sb.append(
                   "    function "
                       + methodName
                       + "(form) {                                                       
           \n");
  -
  +        }
           sb.append("        if (bCancel) \n");
           sb.append("      return true; \n");
           sb.append("        else \n");
  @@ -601,7 +601,7 @@
           StringBuffer sb = new StringBuffer();
   
           sb.append("\n");
  -        if ("true".equals(htmlComment)){
  +        if (!this.isXhtml() && "true".equals(htmlComment)){
               sb.append(htmlEndComment);
           }
           
  
  
  

--
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