You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2007/11/08 13:06:38 UTC

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

Author: manolito
Date: Thu Nov  8 04:06:37 2007
New Revision: 593139

URL: http://svn.apache.org/viewvc?rev=593139&view=rev
Log:
TOMAHAWK-1143
Tree2 renders nonconformant XHTML code

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=593139&r1=593138&r2=593139&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 Thu Nov  8 04:06:37 2007
@@ -340,12 +340,13 @@
             out.startElement(HTML.TD_ELEM, tree);
             out.writeAttribute(HTML.WIDTH_ATTR, "19", null);
             out.writeAttribute(HTML.HEIGHT_ATTR, "100%", null);
-            out.writeURIAttribute("background", lineSrc, null);
+            out.writeAttribute(HTML.STYLE_ATTR, "background-image:" + 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);
             out.writeAttribute(HTML.HEIGHT_ATTR, "18", null);
             out.writeAttribute(HTML.BORDER_ATTR, "0", null);
+            out.writeAttribute(HTML.ALT_ATTR, "", null); // "alt" is a mandatory xhtml attribute
             out.endElement(HTML.IMG_ELEM);
             out.endElement(HTML.TD_ELEM);
         }