Author: hlship
Date: Fri Aug  8 14:26:49 2008
New Revision: 684103

URL: http://svn.apache.org/viewvc?rev=684103&view=rev
Log:
TAPESTRY-2546: Any component always outputs the same id attribute, rather than 
a unique id attribute for each render

Modified:
    
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java
    
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/AnyTest.java

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java?rev=684103&r1=684102&r2=684103&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java
 Fri Aug  8 14:26:49 2008
@@ -72,7 +72,7 @@
         if (uniqueId == null)
         {
             uniqueId = renderSupport.allocateClientId(clientId);
-            anyElement.forceAttributes("id", clientId);
+            anyElement.forceAttributes("id", uniqueId);
         }
 
         return uniqueId;

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/AnyTest.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/AnyTest.java?rev=684103&r1=684102&r2=684103&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/AnyTest.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/AnyTest.java
 Fri Aug  8 14:26:49 2008
@@ -76,7 +76,7 @@
 
         assertEquals(component.getClientId(), uniqueId);
 
-        assertEquals(writer.toString(), "<div id=\"bar\">content</div>");
+        assertEquals(writer.toString(), "<div id=\"bar_0\">content</div>");
 
         assertEquals(component.getClientId(), uniqueId);
 


Reply via email to