Author: dolander
Date: Sat Jul 17 21:13:23 2004
New Revision: 23012

Modified:
   
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/HtmlBaseTag.java
Log:
In the transition to JSP 2.0 EL, String properties don't come in as null when 
the object
bound to is null.  Instead they come in as the empty string so we were writting 
out invalid javascript.

This was reported by Eddie.  The test index pages demonstrated the error.  

Eddie reviewed the diff.




Modified: 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/HtmlBaseTag.java
==============================================================================
--- 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/HtmlBaseTag.java
     (original)
+++ 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/HtmlBaseTag.java
     Sat Jul 17 21:13:23 2004
@@ -107,6 +107,10 @@
      */
     public void setTagId(String tagId)
     {
+        // JSP 2.0 EL will convert a null into a empty string "".  This will
+        // convert that back so that we only set the tagId if there is an 
actual value.
+        if (tagId.equals(""))
+            tagId = null;
         AbstractHtmlState tsh = getState();
         tsh.id = tagId;
     }

Reply via email to