jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sh...@apache.org
Subject cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/rt/core SetTag.java
Date Thu, 18 Apr 2002 16:04:03 GMT
shawn       02/04/18 09:04:03

  Modified:    standard/src/org/apache/taglibs/standard/tag/common/core
                        SetSupport.java
               standard/src/org/apache/taglibs/standard/tag/el/core
                        SetTag.java
               standard/src/org/apache/taglibs/standard/tag/rt/core
                        SetTag.java
  Log:
  Made sure reading <c:set>'s body doesn't exclude specific 'null' from
  attribute.
  
  Revision  Changes    Path
  1.4       +6 -1      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/core/SetSupport.java
  
  Index: SetSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/core/SetSupport.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SetSupport.java	18 Apr 2002 01:57:48 -0000	1.3
  +++ SetSupport.java	18 Apr 2002 16:04:03 -0000	1.4
  @@ -75,6 +75,7 @@
       // Internal state
   
       protected Object value;                             // tag attribute
  +    protected boolean valueSpecified;			// status
       protected Object target;                            // tag attribute
       protected String property;                          // tag attribute
       private String var;					// tag attribute
  @@ -96,6 +97,7 @@
       // resets local state
       private void init() {
           value = var = null;
  +	valueSpecified = false;
   	scope = PageContext.PAGE_SCOPE;
       }
   
  @@ -117,7 +119,10 @@
           if (value != null) {
   	    // ... reading our attribute
   	    result = value;
  -  	} else {
  +  	} else if (valueSpecified) {
  +	    // ... accepting an explicit null
  +	    result = null;
  +	} else {
   	    // ... retrieving and trimming our body
   	    if (bodyContent == null || bodyContent.getString() == null)
   		result = "";
  
  
  
  1.7       +1 -0      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/core/SetTag.java
  
  Index: SetTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/core/SetTag.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SetTag.java	18 Apr 2002 01:57:49 -0000	1.6
  +++ SetTag.java	18 Apr 2002 16:04:03 -0000	1.7
  @@ -111,6 +111,7 @@
   
       public void setValue(String value_) {
           this.value_ = value_;
  +	this.valueSpecified = true;
       }
   
       public void setTarget(String target_) {
  
  
  
  1.3       +1 -0      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/rt/core/SetTag.java
  
  Index: SetTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/rt/core/SetTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SetTag.java	18 Apr 2002 01:57:49 -0000	1.2
  +++ SetTag.java	18 Apr 2002 16:04:03 -0000	1.3
  @@ -73,6 +73,7 @@
       // for tag attribute
       public void setValue(Object value) {
           this.value = value;
  +	this.valueSpecified = true;
       }
   
       // for tag attribute
  
  
  

--
To unsubscribe, e-mail:   <mailto:taglibs-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-dev-help@jakarta.apache.org>


Mime
View raw message