dgraham     2003/02/24 20:30:46

  Modified:    src/share/org/apache/struts/taglib/html OptionTag.java
  Log:
  If body text is empty and there's no resource key to lookup, display
  nothing in the option.  PR#17254
  
  Revision  Changes    Path
  1.16      +7 -5      
jakarta-struts/src/share/org/apache/struts/taglib/html/OptionTag.java
  
  Index: OptionTag.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/OptionTag.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- OptionTag.java    1 Feb 2003 05:30:28 -0000       1.15
  +++ OptionTag.java    25 Feb 2003 04:30:45 -0000      1.16
  @@ -344,8 +344,10 @@
   
           if (this.text != null) {
               return (this.text);
  -        } else {
  +        } else if (this.key != null) {
               return (RequestUtils.message(pageContext, bundle, locale, key));
  +        } else {
  +            return "";  // no body text and no key to lookup so display nothing
           }
   
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to