You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2011/10/21 11:10:31 UTC
svn commit: r1187228 -
/myfaces/core/branches/2.0.x/api/src/test/java/javax/faces/component/UIComponentFindComponentTest.java
Author: bommel
Date: Fri Oct 21 09:10:31 2011
New Revision: 1187228
URL: http://svn.apache.org/viewvc?rev=1187228&view=rev
Log:
(MYFACES-3268) added test for x:x case
Modified:
myfaces/core/branches/2.0.x/api/src/test/java/javax/faces/component/UIComponentFindComponentTest.java
Modified: myfaces/core/branches/2.0.x/api/src/test/java/javax/faces/component/UIComponentFindComponentTest.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/api/src/test/java/javax/faces/component/UIComponentFindComponentTest.java?rev=1187228&r1=1187227&r2=1187228&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/api/src/test/java/javax/faces/component/UIComponentFindComponentTest.java (original)
+++ myfaces/core/branches/2.0.x/api/src/test/java/javax/faces/component/UIComponentFindComponentTest.java Fri Oct 21 09:10:31 2011
@@ -163,6 +163,24 @@ public class UIComponentFindComponentTes
assertNotNull(viewRoot.findComponent(":data:1:command"));
}
+ public void testXXFindComponent() {
+ UIViewRoot viewRoot = new UIViewRoot();
+ UIData uiData = new UIData();
+ uiData.setId("x");
+ UIColumn column = new UIColumn();
+ column.setId("column");
+ UICommand command = new UICommand();
+ command.setId("x");
+ viewRoot.getChildren().add(uiData);
+ uiData.getChildren().add(column);
+ column.getChildren().add(command);
+
+ assertNull(viewRoot.findComponent(":xx"));
+ assertNotNull(viewRoot.findComponent(":x"));
+ assertEquals(column, viewRoot.findComponent(":x:column"));
+ assertEquals(command, viewRoot.findComponent(":x:x"));
+ }
+
public void testWithRelativeExpressionNamingContainer() throws Exception
{
String expression = "testimpl";