Invoking HtmlTagSupport#set with a null value doesn't clear the attribute
-------------------------------------------------------------------------
Key: STS-377
URL: http://mc4j.org/jira/browse/STS-377
Project: Stripes
Issue Type: Bug
Components: Tag Library
Affects Versions: Release 1.4.3
Reporter: Levi Hoogenberg
Assigned To: Tim Fennell
Priority: Minor
It's not possible to clear attributes of tags that extend from HtmlTagSupport.
Most (all) attribute setters delegate to set (String, String), which always
puts a value in the attribute map (which in turn causes writeAttributes to
actually print the attribute). IMO set should look something like
protected final void set(String name, String value) {
if (value == null) {
this.attributes.remove(name);
} else {
this.attributes.put(name, value);
}
}
I noticed this behaviour with DefaultTagErrorRenderer, when my labels started
looking like
<label class="null" for="password">Password:</label>
(caused by Tomcat 6.0.10s tag pooling mechanism).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://mc4j.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
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