You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by jw...@apache.org on 2008/02/14 19:14:23 UTC
svn commit: r627820 -
/myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-api/src/test/java/org/apache/myfaces/trinidad/render/RenderUtilsTest.java
Author: jwaldman
Date: Thu Feb 14 10:14:19 2008
New Revision: 627820
URL: http://svn.apache.org/viewvc?rev=627820&view=rev
Log:
add a couple 'old' tests to RenderUtilsTest.java that are commented out, but so we can see where the differences are.
Modified:
myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-api/src/test/java/org/apache/myfaces/trinidad/render/RenderUtilsTest.java
Modified: myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-api/src/test/java/org/apache/myfaces/trinidad/render/RenderUtilsTest.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-api/src/test/java/org/apache/myfaces/trinidad/render/RenderUtilsTest.java?rev=627820&r1=627819&r2=627820&view=diff
==============================================================================
--- myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-api/src/test/java/org/apache/myfaces/trinidad/render/RenderUtilsTest.java (original)
+++ myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-api/src/test/java/org/apache/myfaces/trinidad/render/RenderUtilsTest.java Thu Feb 14 10:14:19 2008
@@ -102,6 +102,15 @@
relativeId =
RenderUtils.getRelativeId(null, table1, "::commandButton1");
assertEquals("commandButton1", relativeId);
+ // old way starts at table1's parent, so it would go too far out.
+ //assertEquals("::commandButton1", relativeId);
+
+ // this is how you get to something INSIDE the table
+ relativeId =
+ RenderUtils.getRelativeId(null, table1, "someRandomId");
+ assertEquals("table1_Client:someRandomId", relativeId);
+ // old way this would get the peer
+ //assertEquals("someRandomId", relativeId);
relativeId =
RenderUtils.getRelativeId(null, table1, ":commandButton1");
@@ -160,29 +169,30 @@
String relativeId =
RenderUtils.getRelativeId(null, input1, "::button1");
- // old way
- //assertEquals("nc1_Client:button1", relativeId);
-
// new way should pop OUT of this with two ::
assertEquals("ncRoot_Client:button1", relativeId);
+ // old way
+ //assertEquals("nc1_Client:button1", relativeId);
+
relativeId =
RenderUtils.getRelativeId(null, input1, ":::button1");
+ // new way should pop OUT of both NC with two :::
+ assertEquals("button1", relativeId);
// old way
//assertEquals("ncRoot_Client:button1", relativeId);
- // new way should pop OUT of both NC with two :::
- assertEquals("button1", relativeId);
+
relativeId =
RenderUtils.getRelativeId(null, input1, "::::button1");
-
+ // new way should return this
+ assertEquals("button1", relativeId);
// old way returns the original id (THIS IS A BUG).
//assertEquals(":::::button1", relativeId);
- // new way should return this
- assertEquals("button1", relativeId);
+
relativeId =
RenderUtils.getRelativeId(null, input1, ":::::button1");