You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sc...@apache.org on 2005/07/25 20:38:07 UTC

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

Author: schof
Date: Mon Jul 25 11:38:04 2005
New Revision: 225161

URL: http://svn.apache.org/viewcvs?rev=225161&view=rev
Log:
Fixes MYFACES-308

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

Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/tree2/HtmlTreeRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/tree2/HtmlTreeRenderer.java?rev=225161&r1=225160&r2=225161&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/tree2/HtmlTreeRenderer.java (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/tree2/HtmlTreeRenderer.java Mon Jul 25 11:38:04 2005
@@ -60,7 +60,8 @@
     private static final String ATTRIB_KEYVAL = "=";
     private static final String NODE_STATE_EXPANDED = "x";
     private static final String NODE_STATE_CLOSED = "c";
-    private final static String SEPARATOR = String.valueOf(NamingContainer.SEPARATOR_CHAR);
+    private static final String SEPARATOR = String.valueOf(NamingContainer.SEPARATOR_CHAR);
+    private static final String IMAGE_PREFIX = "t2";
 
     private static final int NOTHING = 0;
     private static final int CHILDREN = 1;
@@ -462,7 +463,7 @@
 
         // add the appropriate image for the nav control
         UIGraphic image = new UIGraphic();
-        image.setId(context.getViewRoot().createUniqueId());
+        image.setId(IMAGE_PREFIX + context.getViewRoot().createUniqueId());
         image.setUrl(navSrcUrl);
         Map imageAttrs = image.getAttributes();
         imageAttrs.put(HTML.WIDTH_ATTR, "19");
@@ -486,7 +487,7 @@
                 expandImgSrc = expandImg.getUrl();
                 if (expandImg.isRendered())
                 {
-                    expandImg.setId(context.getViewRoot().createUniqueId());
+                    expandImg.setId(IMAGE_PREFIX + context.getViewRoot().createUniqueId());
                     nodeImageId = expandImg.getClientId(context);
                     nodeImgFacet = expandFacet;
                 }
@@ -499,7 +500,7 @@
                 collapseImgSrc = collapseImg.getUrl();
                 if (collapseImg.isRendered())
                 {
-                    collapseImg.setId(context.getViewRoot().createUniqueId());
+                    collapseImg.setId(IMAGE_PREFIX + context.getViewRoot().createUniqueId());
                     nodeImageId = collapseImg.getClientId(context);
                     nodeImgFacet = collapseFacet;
                 }