You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by ha...@apache.org on 2004/01/07 04:40:58 UTC

cvs commit: jakarta-tapestry/framework/src/org/apache/tapestry AbstractMarkupWriter.java

harishkswamy    2004/01/06 19:40:58

  Modified:    framework/src/org/apache/tapestry AbstractMarkupWriter.java
  Log:
  Modified attribute(String, String) to write and empty string when the passed in value is null.
  Previously it was copying the name when the value was null.
  
  Revision  Changes    Path
  1.11      +3 -8      jakarta-tapestry/framework/src/org/apache/tapestry/AbstractMarkupWriter.java
  
  Index: AbstractMarkupWriter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/org/apache/tapestry/AbstractMarkupWriter.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- AbstractMarkupWriter.java	19 Oct 2003 14:51:58 -0000	1.10
  +++ AbstractMarkupWriter.java	7 Jan 2004 03:40:58 -0000	1.11
  @@ -382,7 +382,7 @@
        *  {@link #begin(String)}
        *  and before any other kind of writing (which closes the tag).
        *
  -     *  <p>The value may be null.
  +     *  <p>The value may be null. A null value will be rendered as an empty string.
        *
        *  <p>Troublesome characters in the value are converted to thier GTML entities, much
        *  like a <code>print()</code> method, with the following exceptions:
  @@ -410,13 +410,8 @@
           _writer.print(name);
           _writer.print("=\"");
   
  -        if (value == null)
  +        if (value != null)
           {
  -            _writer.print(name);
  -        }
  -        else
  -        {
  -
               int length = value.length();
   
               if (_buffer == null || _buffer.length < length)
  
  
  

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