You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by pi...@apache.org on 2003/05/07 22:26:23 UTC
cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/fmt FormatNumberSupport.java
pierred 2003/05/07 13:26:23
Modified: standard/src/org/apache/taglibs/standard/tag/common/fmt
FormatNumberSupport.java
Log:
Fix for bug 18498:
If value is null or empty, remove the scoped variable if it
is specified.
Revision Changes Path
1.22 +6 -1 jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/fmt/FormatNumberSupport.java
Index: FormatNumberSupport.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/fmt/FormatNumberSupport.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- FormatNumberSupport.java 14 Mar 2003 22:04:37 -0000 1.21
+++ FormatNumberSupport.java 7 May 2003 20:26:23 -0000 1.22
@@ -169,7 +169,12 @@
}
if ((input == null) || input.equals("")) {
- // do nothing
+ // Spec says:
+ // If value is null or empty, remove the scoped variable
+ // if it is specified (see attributes var and scope).
+ if (var != null) {
+ pageContext.removeAttribute(var, scope);
+ }
return EVAL_PAGE;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org