Revision: 569
http://svn.sourceforge.net/stripes/?rev=569&view=rev
Author: bengunter
Date: 2007-06-05 14:34:45 -0700 (Tue, 05 Jun 2007)
Log Message:
-----------
Resolved STS-377: Invoking HtmlTagSupport#set with a null value doesn't clear
the attribute. If value is null, the attribute is removed from the map. This
makes sense. If the desired value is an empty string, then an empty string
should be passed to set(...).
Modified Paths:
--------------
trunk/stripes/src/net/sourceforge/stripes/tag/HtmlTagSupport.java
Modified: trunk/stripes/src/net/sourceforge/stripes/tag/HtmlTagSupport.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/tag/HtmlTagSupport.java
2007-06-05 21:10:22 UTC (rev 568)
+++ trunk/stripes/src/net/sourceforge/stripes/tag/HtmlTagSupport.java
2007-06-05 21:34:45 UTC (rev 569)
@@ -47,7 +47,12 @@
/** Sets the named attribute to the supplied value. */
protected final void set(String name, String value) {
- this.attributes.put(name, value);
+ if (value == null) {
+ this.attributes.remove(name);
+ }
+ else {
+ this.attributes.put(name, value);
+ }
}
/** Gets the value of the named attribute, or null if it is not set. */
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development