You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2010/07/30 19:32:56 UTC

svn commit: r980892 - /myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree2/HtmlTreeRenderer.java

Author: lu4242
Date: Fri Jul 30 17:32:56 2010
New Revision: 980892

URL: http://svn.apache.org/viewvc?rev=980892&view=rev
Log:
TOMAHAWK-1496 HtmlTreeRenderer 'background-image' incorrect html style attribute

Modified:
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree2/HtmlTreeRenderer.java

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree2/HtmlTreeRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree2/HtmlTreeRenderer.java?rev=980892&r1=980891&r2=980892&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree2/HtmlTreeRenderer.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree2/HtmlTreeRenderer.java Fri Jul 30 17:32:56 2010
@@ -350,7 +350,7 @@ public class HtmlTreeRenderer extends Re
             out.startElement(HTML.TD_ELEM, tree);
             out.writeAttribute(HTML.WIDTH_ATTR, "19", null);
             out.writeAttribute(HTML.HEIGHT_ATTR, "100%", null);
-            out.writeAttribute(HTML.STYLE_ATTR, "background-image:" + lineSrc + ";", null); //we use "style" because "background" is no valid xhtml attribute for td
+            out.writeURIAttribute(HTML.STYLE_ATTR, "background-image:url('" + lineSrc + "');", null); //we use "style" because "background" is no valid xhtml attribute for td
             out.startElement(HTML.IMG_ELEM, tree);
             out.writeURIAttribute(HTML.SRC_ATTR, lineSrc, null);
             out.writeAttribute(HTML.WIDTH_ATTR, "19", null);
@@ -503,7 +503,7 @@ public class HtmlTreeRenderer extends Re
         if ((bitMask & LINES)!=0 && (bitMask & LAST)==0)
         {
             //out.writeURIAttribute("background", getImageSrc(context, tree, "line-trunk.gif", true), null);
-            out.writeURIAttribute(HTML.STYLE_ATTR, "background-image:" + getImageSrc(context, tree, "line-trunk.gif", true) + ";", null); 
+            out.writeURIAttribute(HTML.STYLE_ATTR, "background-image:url('" + getImageSrc(context, tree, "line-trunk.gif", true) + "');", null); 
         }
 
 //      add the appropriate image for the nav control