You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2011/07/30 22:11:29 UTC

svn commit: r1152504 [3/5] - in /myfaces/core/trunk/impl/src: main/java/org/apache/myfaces/view/facelets/ main/java/org/apache/myfaces/view/facelets/el/ main/java/org/apache/myfaces/view/facelets/tag/ test/java/org/apache/myfaces/view/facelets/tag/comp...

Added: myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentValueChangeListenerTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentValueChangeListenerTestCase.java?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentValueChangeListenerTestCase.java (added)
+++ myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentValueChangeListenerTestCase.java Sat Jul 30 20:11:17 2011
@@ -0,0 +1,471 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.view.facelets.tag.composite;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
+import javax.faces.component.UINamingContainer;
+import javax.faces.component.UIViewRoot;
+import javax.faces.event.ValueChangeEvent;
+
+import org.apache.myfaces.config.RuntimeConfig;
+import org.apache.myfaces.test.mock.MockExternalContext;
+import org.apache.myfaces.view.facelets.FaceletTestCase;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class CompositeComponentValueChangeListenerTestCase extends FaceletTestCase
+{
+    @Override
+    protected void setupComponents() throws Exception
+    {
+        super.setupComponents();
+        application.addComponent(CompositeTestComponent.class.getName(), 
+                CompositeTestComponent.class.getName());
+        application.addComponent(SimpleComponent.class.getName(), SimpleComponent.class.getName());
+    }
+
+    @Override
+    protected void setUpServletObjects() throws Exception
+    {
+        super.setUpServletObjects();
+        servletContext.addInitParameter("javax.faces.FACELETS_LIBRARIES", "/test-facelet.taglib.xml");
+    }
+    
+    @Override
+    protected void setUpExternalContext() throws Exception
+    {
+        externalContext =
+            new MockExternalContext(servletContext, request, response);
+        
+        //RuntimeConfig.getCurrentInstance(externalContext).setPropertyResolver(
+        //        new PropertyResolverImpl());
+        //RuntimeConfig.getCurrentInstance(externalContext).setVariableResolver(
+        //        new VariableResolverImpl());
+        // For this test we need the a real one, because the Mock does not
+        // handle VariableMapper stuff properly and ui:param logic will not work
+        RuntimeConfig.getCurrentInstance(externalContext).setExpressionFactory(
+                new org.apache.el.ExpressionFactoryImpl());
+    }
+
+    @Test
+    public void testSimpleValueChangeListenerTarget() throws Exception
+    {
+        MockAttributeBean bean = new MockAttributeBean();
+        
+        facesContext.getExternalContext().getRequestMap().put("bean",
+                bean);
+        
+        UIViewRoot root = facesContext.getViewRoot();
+        vdl.buildView(facesContext, root, "testSimpleAttributeValueChangeListenerTarget.xhtml");
+
+        
+        UIComponent panelGroup1 = root.findComponent("testGroup1");
+        Assert.assertNotNull(panelGroup1);
+        UINamingContainer compositeComponent1 = (UINamingContainer) panelGroup1.getChildren().get(0);
+        Assert.assertNotNull(compositeComponent1);
+        UIInput input1 = (UIInput) compositeComponent1.findComponent("testComponent");
+        Assert.assertNotNull(input1);
+        Assert.assertNotNull(input1.getValueChangeListeners());
+        Assert.assertEquals(1, input1.getValueChangeListeners().length);
+        
+        bean.setValueChangeListener1Called(false);
+        input1.getValueChangeListeners()[0].processValueChange(new ValueChangeEvent(input1,"x","y"));
+        Assert.assertTrue(bean.isValueChangeListener1Called());
+
+        UIComponent panelGroup2 = root.findComponent("testGroup2");
+        Assert.assertNotNull(panelGroup2);
+        UINamingContainer compositeComponent2 = (UINamingContainer) panelGroup2.getChildren().get(0);
+        Assert.assertNotNull(compositeComponent2);
+        UIInput input2 = (UIInput) compositeComponent2.findComponent("testComponent");
+        Assert.assertNotNull(input2);
+        Assert.assertNotNull(input2.getValueChangeListeners());
+        Assert.assertEquals(1, input2.getValueChangeListeners().length);
+        
+        bean.setValueChangeListener2Called(false);
+        input2.getValueChangeListeners()[0].processValueChange(new ValueChangeEvent(input2,"x","y"));
+        Assert.assertTrue(bean.isValueChangeListener2Called());
+    }
+
+    @Test
+    public void testCompositeValueChangeListenerTarget() throws Exception
+    {
+        MockAttributeBean bean = new MockAttributeBean();
+        
+        facesContext.getExternalContext().getRequestMap().put("bean",
+                bean);
+        
+        UIViewRoot root = facesContext.getViewRoot();
+        vdl.buildView(facesContext, root, "testCompositeAttributeValueChangeListenerTarget.xhtml");
+
+        UIComponent panelGroup1 = root.findComponent("testGroup1");
+        Assert.assertNotNull(panelGroup1);
+        UINamingContainer compositeComponent1 = (UINamingContainer) panelGroup1.getChildren().get(0);
+        Assert.assertNotNull(compositeComponent1);
+        
+        UINamingContainer compositeComponent1inner = (UINamingContainer) compositeComponent1.findComponent("simpleAttributeMethodExpressionTarget");
+        Assert.assertNotNull(compositeComponent1inner);
+        UIInput input1 = (UIInput) compositeComponent1inner.findComponent("testComponent");
+        Assert.assertNotNull(input1);
+        Assert.assertNotNull(input1.getValueChangeListeners());
+        Assert.assertEquals(1, input1.getValueChangeListeners().length);
+        
+        bean.setValueChangeListener1Called(false);
+        input1.getValueChangeListeners()[0].processValueChange(new ValueChangeEvent(input1,"x","y"));
+        Assert.assertTrue(bean.isValueChangeListener1Called());
+
+        UIComponent panelGroup2 = root.findComponent("testGroup2");
+        Assert.assertNotNull(panelGroup2);
+        UINamingContainer compositeComponent2 = (UINamingContainer) panelGroup2.getChildren().get(0);
+        Assert.assertNotNull(compositeComponent2);
+        
+        UINamingContainer compositeComponent2inner = (UINamingContainer) compositeComponent2.findComponent("simpleAttributeMethodExpressionTarget");
+        Assert.assertNotNull(compositeComponent2inner);
+        UIInput input2 = (UIInput) compositeComponent2inner.findComponent("testComponent");
+        Assert.assertNotNull(input2);
+        Assert.assertNotNull(input2.getValueChangeListeners());
+        Assert.assertEquals(1, input2.getValueChangeListeners().length);
+        
+        bean.setValueChangeListener2Called(false);
+        input2.getValueChangeListeners()[0].processValueChange(new ValueChangeEvent(input2,"x","y"));
+        Assert.assertTrue(bean.isValueChangeListener2Called());
+
+    }
+    
+    @Test
+    public void testSimpleValueChangeListenerTarget2() throws Exception
+    {
+        MockAttributeBean bean = new MockAttributeBean();
+        
+        facesContext.getExternalContext().getRequestMap().put("bean",
+                bean);
+        
+        UIViewRoot root = facesContext.getViewRoot();
+        vdl.buildView(facesContext, root, "testSimpleAttributeValueChangeListenerTarget2.xhtml");
+
+        
+        UIComponent panelGroup1 = root.findComponent("testGroup1");
+        Assert.assertNotNull(panelGroup1);
+        UINamingContainer compositeComponent1 = (UINamingContainer) panelGroup1.getChildren().get(0);
+        Assert.assertNotNull(compositeComponent1);
+        UIInput input1 = (UIInput) compositeComponent1.findComponent("testComponent");
+        Assert.assertNotNull(input1);
+        Assert.assertNotNull(input1.getValueChangeListeners());
+        Assert.assertEquals(1, input1.getValueChangeListeners().length);
+        
+        bean.setValueChangeListener1Called(false);
+        input1.getValueChangeListeners()[0].processValueChange(new ValueChangeEvent(input1,"x","y"));
+        Assert.assertTrue(bean.isValueChangeListener1Called());
+        
+        UIInput input1n = (UIInput) compositeComponent1.findComponent("testComponentNoTarget");
+        
+        Assert.assertNotNull(input1n);
+        Assert.assertNotNull(input1n.getValueChangeListeners());
+        Assert.assertEquals(1, input1n.getValueChangeListeners().length);
+        
+        compositeComponent1.pushComponentToEL(facesContext, compositeComponent1);
+        bean.setValueChangeListener1Called(false);
+        input1n.getValueChangeListeners()[0].processValueChange(new ValueChangeEvent(input1n,"x","y"));
+        Assert.assertTrue(bean.isValueChangeListener1Called());
+        compositeComponent1.popComponentFromEL(facesContext);
+        
+        UIComponent panelGroup2 = root.findComponent("testGroup2");
+        Assert.assertNotNull(panelGroup2);
+        UINamingContainer compositeComponent2 = (UINamingContainer) panelGroup2.getChildren().get(0);
+        Assert.assertNotNull(compositeComponent2);
+        UIInput input2 = (UIInput) compositeComponent2.findComponent("testComponent");
+        Assert.assertNotNull(input2);
+        Assert.assertNotNull(input2.getValueChangeListeners());
+        Assert.assertEquals(1, input2.getValueChangeListeners().length);
+        
+        bean.setValueChangeListener2Called(false);
+        input2.getValueChangeListeners()[0].processValueChange(new ValueChangeEvent(input2,"x","y"));
+        Assert.assertTrue(bean.isValueChangeListener2Called());
+        
+        UIInput input2n = (UIInput) compositeComponent2.findComponent("testComponentNoTarget");
+        
+        Assert.assertNotNull(input2n);
+        Assert.assertNotNull(input2n.getValueChangeListeners());
+        Assert.assertEquals(1, input2n.getValueChangeListeners().length);
+        
+        compositeComponent2.pushComponentToEL(facesContext, compositeComponent2);
+        bean.setValueChangeListener2Called(false);
+        input2n.getValueChangeListeners()[0].processValueChange(new ValueChangeEvent(input2n,"x","y"));
+        Assert.assertTrue(bean.isValueChangeListener2Called());
+        compositeComponent2.popComponentFromEL(facesContext);
+    }
+
+    @Test
+    public void testCompositeValueChangeListenerTarget2() throws Exception
+    {
+        MockAttributeBean bean = new MockAttributeBean();
+        
+        facesContext.getExternalContext().getRequestMap().put("bean",
+                bean);
+        
+        UIViewRoot root = facesContext.getViewRoot();
+        vdl.buildView(facesContext, root, "testCompositeAttributeValueChangeListenerTarget2.xhtml");
+
+        UIComponent panelGroup1 = root.findComponent("testGroup1");
+        Assert.assertNotNull(panelGroup1);
+        UINamingContainer compositeComponent1 = (UINamingContainer) panelGroup1.getChildren().get(0);
+        Assert.assertNotNull(compositeComponent1);
+        
+        UINamingContainer compositeComponent1target = (UINamingContainer) compositeComponent1.findComponent("simpleAttributeMethodExpressionTarget");
+        Assert.assertNotNull(compositeComponent1target);
+        UIInput input1target = (UIInput) compositeComponent1target.findComponent("testComponent");
+        Assert.assertNotNull(input1target);
+        Assert.assertNotNull(input1target.getValueChangeListeners());
+        Assert.assertEquals(1, input1target.getValueChangeListeners().length);
+        
+        bean.setValueChangeListener1Called(false);
+        input1target.getValueChangeListeners()[0].processValueChange(new ValueChangeEvent(input1target,"x","y"));
+        Assert.assertTrue(bean.isValueChangeListener1Called());
+
+        UIInput input1notarget = (UIInput) compositeComponent1target.findComponent("testComponentNoTarget");
+        Assert.assertNotNull(input1notarget);
+        Assert.assertNotNull(input1notarget.getValueChangeListeners());
+        Assert.assertEquals(1, input1notarget.getValueChangeListeners().length);
+        
+        compositeComponent1.pushComponentToEL(facesContext, compositeComponent1);
+        compositeComponent1target.pushComponentToEL(facesContext, compositeComponent1target);
+        bean.setValueChangeListener1Called(false);
+        input1notarget.getValueChangeListeners()[0].processValueChange(new ValueChangeEvent(input1notarget,"x","y"));
+        Assert.assertTrue(bean.isValueChangeListener1Called());
+        compositeComponent1target.popComponentFromEL(facesContext);
+        compositeComponent1.popComponentFromEL(facesContext);
+        
+        UINamingContainer compositeComponent1notarget = (UINamingContainer) compositeComponent1.findComponent("simpleAttributeMethodExpressionNoTarget");
+        Assert.assertNotNull(compositeComponent1notarget);
+        UIInput inputnotarget1target = (UIInput) compositeComponent1notarget.findComponent("testComponent");
+        Assert.assertNotNull(inputnotarget1target);
+        Assert.assertNotNull(inputnotarget1target.getValueChangeListeners());
+        Assert.assertEquals(1, inputnotarget1target.getValueChangeListeners().length);
+        
+        compositeComponent1.pushComponentToEL(facesContext, compositeComponent1);
+        compositeComponent1notarget.pushComponentToEL(facesContext, compositeComponent1notarget);
+        bean.setValueChangeListener1Called(false);
+        inputnotarget1target.getValueChangeListeners()[0].processValueChange(new ValueChangeEvent(inputnotarget1target,"x","y"));
+        Assert.assertTrue(bean.isValueChangeListener1Called());
+        compositeComponent1notarget.popComponentFromEL(facesContext);
+        compositeComponent1.popComponentFromEL(facesContext);
+        
+        UIInput inputnotarget1notarget = (UIInput) compositeComponent1notarget.findComponent("testComponentNoTarget");
+        Assert.assertNotNull(inputnotarget1notarget);
+        Assert.assertNotNull(inputnotarget1notarget.getValueChangeListeners());
+        Assert.assertEquals(1, inputnotarget1notarget.getValueChangeListeners().length);
+        compositeComponent1.pushComponentToEL(facesContext, compositeComponent1);
+        compositeComponent1notarget.pushComponentToEL(facesContext, compositeComponent1notarget);
+        bean.setValueChangeListener1Called(false);
+        inputnotarget1notarget.getValueChangeListeners()[0].processValueChange(new ValueChangeEvent(inputnotarget1notarget,"x","y"));
+        Assert.assertTrue(bean.isValueChangeListener1Called());
+        compositeComponent1notarget.popComponentFromEL(facesContext);
+        compositeComponent1.popComponentFromEL(facesContext);
+        
+        UIComponent panelGroup2 = root.findComponent("testGroup2");
+        Assert.assertNotNull(panelGroup2);
+        UINamingContainer compositeComponent2 = (UINamingContainer) panelGroup2.getChildren().get(0);
+        Assert.assertNotNull(compositeComponent2);
+        
+        UINamingContainer compositeComponent2target = (UINamingContainer) compositeComponent2.findComponent("simpleAttributeMethodExpressionTarget");
+        Assert.assertNotNull(compositeComponent2target);
+        UIInput input2target = (UIInput) compositeComponent2target.findComponent("testComponent");
+        Assert.assertNotNull(input2target);
+        Assert.assertNotNull(input2target.getValueChangeListeners());
+        Assert.assertEquals(1, input2target.getValueChangeListeners().length);
+        
+        bean.setValueChangeListener2Called(false);
+        input2target.getValueChangeListeners()[0].processValueChange(new ValueChangeEvent(input2target,"x","y"));
+        Assert.assertTrue(bean.isValueChangeListener2Called());
+
+        UIInput input2notarget = (UIInput) compositeComponent2target.findComponent("testComponentNoTarget");
+        Assert.assertNotNull(input2notarget);
+        Assert.assertNotNull(input2notarget.getValueChangeListeners());
+        Assert.assertEquals(1, input2notarget.getValueChangeListeners().length);
+        
+        compositeComponent2.pushComponentToEL(facesContext, compositeComponent2);
+        compositeComponent2target.pushComponentToEL(facesContext, compositeComponent2target);
+        bean.setValueChangeListener2Called(false);
+        input2notarget.getValueChangeListeners()[0].processValueChange(new ValueChangeEvent(input2notarget,"x","y"));
+        Assert.assertTrue(bean.isValueChangeListener2Called());
+        compositeComponent2target.popComponentFromEL(facesContext);
+        compositeComponent2.popComponentFromEL(facesContext);
+        
+        UINamingContainer compositeComponent2notarget = (UINamingContainer) compositeComponent2.findComponent("simpleAttributeMethodExpressionNoTarget");
+        Assert.assertNotNull(compositeComponent2notarget);
+        UIInput inputnotarget2target = (UIInput) compositeComponent2notarget.findComponent("testComponent");
+        Assert.assertNotNull(inputnotarget2target);
+        Assert.assertNotNull(inputnotarget2target.getValueChangeListeners());
+        Assert.assertEquals(1, inputnotarget2target.getValueChangeListeners().length);
+        
+        compositeComponent2.pushComponentToEL(facesContext, compositeComponent2);
+        compositeComponent2notarget.pushComponentToEL(facesContext, compositeComponent2notarget);
+        bean.setValueChangeListener2Called(false);
+        inputnotarget2target.getValueChangeListeners()[0].processValueChange(new ValueChangeEvent(inputnotarget2target,"x","y"));
+        Assert.assertTrue(bean.isValueChangeListener2Called());
+        compositeComponent2notarget.popComponentFromEL(facesContext);
+        compositeComponent2.popComponentFromEL(facesContext);
+        
+        UIInput inputnotarget2notarget = (UIInput) compositeComponent2notarget.findComponent("testComponentNoTarget");
+        Assert.assertNotNull(inputnotarget2notarget);
+        Assert.assertNotNull(inputnotarget2notarget.getValueChangeListeners());
+        Assert.assertEquals(1, inputnotarget2notarget.getValueChangeListeners().length);
+        compositeComponent2.pushComponentToEL(facesContext, compositeComponent2);
+        compositeComponent2notarget.pushComponentToEL(facesContext, compositeComponent2notarget);
+        bean.setValueChangeListener2Called(false);
+        inputnotarget2notarget.getValueChangeListeners()[0].processValueChange(new ValueChangeEvent(inputnotarget2notarget,"x","y"));
+        Assert.assertTrue(bean.isValueChangeListener2Called());
+        compositeComponent2notarget.popComponentFromEL(facesContext);
+        compositeComponent2.popComponentFromEL(facesContext);
+    }
+    
+    @Test
+    public void testSimpleValueChangeListenerNoTarget() throws Exception
+    {
+        MockAttributeBean bean = new MockAttributeBean();
+        
+        facesContext.getExternalContext().getRequestMap().put("bean",
+                bean);
+        
+        UIViewRoot root = facesContext.getViewRoot();
+        vdl.buildView(facesContext, root, "testSimpleAttributeValueChangeListenerNoTarget.xhtml");
+
+        UIComponent panelGroup1 = root.findComponent("testGroup1");
+        Assert.assertNotNull(panelGroup1);
+        UINamingContainer compositeComponent1 = (UINamingContainer) panelGroup1.getChildren().get(0);
+        Assert.assertNotNull(compositeComponent1);
+        UIInput input1 = (UIInput) compositeComponent1.findComponent("testComponentNoTarget");
+        Assert.assertNotNull(input1);
+        Assert.assertNotNull(input1.getValueChangeListeners());
+        Assert.assertEquals(1, input1.getValueChangeListeners().length);
+        
+        compositeComponent1.pushComponentToEL(facesContext, compositeComponent1);
+        input1.pushComponentToEL(facesContext,  input1);
+        bean.setValueChangeListener1Called(false);
+        input1.getValueChangeListeners()[0].processValueChange(new ValueChangeEvent(input1,"x","y"));
+        Assert.assertTrue(bean.isValueChangeListener1Called());
+        input1.popComponentFromEL(facesContext);
+        compositeComponent1.popComponentFromEL(facesContext);
+
+        UIComponent panelGroup2 = root.findComponent("testGroup2");
+        Assert.assertNotNull(panelGroup2);
+        UINamingContainer compositeComponent2 = (UINamingContainer) panelGroup2.getChildren().get(0);
+        Assert.assertNotNull(compositeComponent2);
+        UIInput input2 = (UIInput) compositeComponent2.findComponent("testComponentNoTarget");
+        Assert.assertNotNull(input2);
+        Assert.assertNotNull(input2.getValueChangeListeners());
+        Assert.assertEquals(1, input2.getValueChangeListeners().length);
+
+        
+        compositeComponent2.pushComponentToEL(facesContext, compositeComponent2);
+        input2.pushComponentToEL(facesContext,  input2);
+        bean.setValueChangeListener2Called(false);
+        input2.getValueChangeListeners()[0].processValueChange(new ValueChangeEvent(input2,"x","y"));
+        Assert.assertTrue(bean.isValueChangeListener2Called());
+        input2.popComponentFromEL(facesContext);
+        compositeComponent2.popComponentFromEL(facesContext);
+
+    }
+    
+    @Test
+    public void testCompositeValueChangeListenerNoTarget() throws Exception
+    {
+        MockAttributeBean bean = new MockAttributeBean();
+        
+        facesContext.getExternalContext().getRequestMap().put("bean",
+                bean);
+        
+        UIViewRoot root = facesContext.getViewRoot();
+        vdl.buildView(facesContext, root, "testCompositeAttributeValueChangeListenerNoTarget.xhtml");
+
+        UIComponent panelGroup1 = root.findComponent("testGroup1");
+        Assert.assertNotNull(panelGroup1);
+        UINamingContainer compositeComponent1 = (UINamingContainer) panelGroup1.getChildren().get(0);
+        Assert.assertNotNull(compositeComponent1);
+
+        UINamingContainer compositeComponent1inner = (UINamingContainer) compositeComponent1.findComponent("simpleAttributeActionMethodExpressionNoTarget");
+        Assert.assertNotNull(compositeComponent1inner);
+        UIInput testComponentNoTarget1 = (UIInput) compositeComponent1inner.findComponent("testComponentNoTarget");
+        Assert.assertNotNull(testComponentNoTarget1);
+        Assert.assertNotNull(testComponentNoTarget1.getValueChangeListeners());
+        Assert.assertEquals(1, testComponentNoTarget1.getValueChangeListeners().length);
+
+        compositeComponent1.pushComponentToEL(facesContext, compositeComponent1);
+        compositeComponent1.pushComponentToEL(facesContext, compositeComponent1inner);
+        bean.setValueChangeListener1Called(false);
+        testComponentNoTarget1.getValueChangeListeners()[0].processValueChange(new ValueChangeEvent(testComponentNoTarget1,"x","y"));
+        Assert.assertTrue(bean.isValueChangeListener1Called());
+        compositeComponent1inner.popComponentFromEL(facesContext);
+        compositeComponent1.popComponentFromEL(facesContext);
+
+        UIComponent panelGroup2 = root.findComponent("testGroup2");
+        Assert.assertNotNull(panelGroup2);
+        UINamingContainer compositeComponent2 = (UINamingContainer) panelGroup2.getChildren().get(0);
+        Assert.assertNotNull(compositeComponent2);
+
+        UINamingContainer compositeComponent2inner = (UINamingContainer) compositeComponent2.findComponent("simpleAttributeActionMethodExpressionNoTarget");
+        Assert.assertNotNull(compositeComponent2inner);
+        UIInput testComponentNoTarget2 = (UIInput) compositeComponent2inner.findComponent("testComponentNoTarget");
+        Assert.assertNotNull(testComponentNoTarget2);
+        Assert.assertNotNull(testComponentNoTarget2.getValueChangeListeners());
+        Assert.assertEquals(1, testComponentNoTarget2.getValueChangeListeners().length);
+
+        compositeComponent2.pushComponentToEL(facesContext, compositeComponent2);
+        compositeComponent2.pushComponentToEL(facesContext, compositeComponent2inner);
+        bean.setValueChangeListener2Called(false);
+        testComponentNoTarget2.getValueChangeListeners()[0].processValueChange(new ValueChangeEvent(testComponentNoTarget2,"x","y"));
+        Assert.assertTrue(bean.isValueChangeListener2Called());
+        compositeComponent2inner.popComponentFromEL(facesContext);
+        compositeComponent2.popComponentFromEL(facesContext);
+    
+    }
+
+    @Test
+    public void testCompositeValueChangeListenerNoTarget2() throws Exception
+    {
+        MockAttributeBean bean = new MockAttributeBean();
+        
+        facesContext.getExternalContext().getRequestMap().put("bean",
+                bean);
+        
+        UIViewRoot root = facesContext.getViewRoot();
+        vdl.buildView(facesContext, root, "testCompositeAttributeValueChangeListenerNoTarget2.xhtml");
+        
+        UIComponent panelGroup1 = root.findComponent("testGroup1");
+        Assert.assertNotNull(panelGroup1);
+        UINamingContainer compositeComponent1 = (UINamingContainer) panelGroup1.getChildren().get(0);
+        Assert.assertNotNull(compositeComponent1);
+        
+        UINamingContainer compositeComponent1n1 = (UINamingContainer) compositeComponent1.findComponent("compositeAttributeMethodExpressionNoTarget");
+        Assert.assertNotNull(compositeComponent1n1);
+        UINamingContainer compositeComponent1n2 = (UINamingContainer) compositeComponent1n1.findComponent("simpleAttributeMethodExpressionNoTarget");
+        Assert.assertNotNull(compositeComponent1n2);
+        UIInput input1 = (UIInput) compositeComponent1n2.findComponent("testComponentNoTarget");
+        Assert.assertNotNull(input1);
+        Assert.assertNotNull(input1.getValueChangeListeners());
+        Assert.assertEquals(1, input1.getValueChangeListeners().length);
+        compositeComponent1.pushComponentToEL(facesContext, compositeComponent1);
+        compositeComponent1.pushComponentToEL(facesContext, compositeComponent1n2);
+        bean.setValueChangeListener1Called(false);
+        input1.getValueChangeListeners()[0].processValueChange(new ValueChangeEvent(input1,"x","y"));
+        Assert.assertTrue(bean.isValueChangeListener1Called());
+        compositeComponent1n2.popComponentFromEL(facesContext);
+        compositeComponent1.popComponentFromEL(facesContext);
+    }
+}

Modified: myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/MockAttributeBean.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/MockAttributeBean.java?rev=1152504&r1=1152503&r2=1152504&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/MockAttributeBean.java (original)
+++ myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/MockAttributeBean.java Sat Jul 30 20:11:17 2011
@@ -18,11 +18,14 @@
  */
 package org.apache.myfaces.view.facelets.tag.composite;
 
+import javax.faces.component.UIComponent;
 import javax.faces.application.FacesMessage;
 import javax.faces.context.FacesContext;
 import javax.faces.event.AbortProcessingException;
 import javax.faces.event.ActionEvent;
 import javax.faces.event.ActionListener;
+import javax.faces.event.ValueChangeEvent;
+import javax.faces.validator.ValidatorException;
 
 public class MockAttributeBean
 {
@@ -47,6 +50,96 @@ public class MockAttributeBean
         return "somethingFunny"+a;
     }
     
+    public String doSomeAction()
+    {
+        return "someAction";
+    }
+    
+    private boolean actionListener1Called = false;
+    
+    public boolean isActionListener1Called()
+    {
+        return actionListener1Called;
+    }
+    
+    public void setActionListener1Called(boolean value)
+    {
+        actionListener1Called = value;
+    }
+    
+    public void doSomeActionListener1()
+    {
+        actionListener1Called = true;
+    }
+
+    private boolean actionListener2Called = false;
+    
+    public boolean isActionListener2Called()
+    {
+        return actionListener2Called;
+    }
+    
+    public void setActionListener2Called(boolean value)
+    {
+        actionListener2Called = value;
+    }
+
+    public void doSomeActionListener2(ActionEvent evt)
+    {
+        actionListener2Called = true;
+    }
+    
+    private boolean valueChangeListener1Called = false;
+    
+    public boolean isValueChangeListener1Called()
+    {
+        return valueChangeListener1Called;
+    }
+    
+    public void setValueChangeListener1Called(boolean value)
+    {
+        valueChangeListener1Called = value;
+    }
+    
+    public void doSomeValueChangeListener1() throws AbortProcessingException
+    {
+        valueChangeListener1Called = true;
+    }
+
+    private boolean valueChangeListener2Called = false;
+    
+    public boolean isValueChangeListener2Called()
+    {
+        return valueChangeListener2Called;
+    }
+    
+    public void setValueChangeListener2Called(boolean value)
+    {
+        valueChangeListener2Called = value;
+    }
+
+    public void doSomeValueChangeListener2(ValueChangeEvent evt) throws AbortProcessingException
+    {
+        valueChangeListener2Called = true;
+    }
+    
+    private boolean validator1Called = false;
+    
+    public boolean isValidator1Called()
+    {
+        return validator1Called;
+    }
+    
+    public void setValidator1Called(boolean value)
+    {
+        validator1Called = value;
+    }
+    
+    public void doSomeValidator1(FacesContext context, UIComponent component, Object value) throws ValidatorException
+    {
+        validator1Called = true;
+    }
+
     private ActionListener submitActionListener;
     private ActionListener cancelActionListener;
     

Added: myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/SimpleComponentTagHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/SimpleComponentTagHandler.java?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/SimpleComponentTagHandler.java (added)
+++ myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/SimpleComponentTagHandler.java Sat Jul 30 20:11:17 2011
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.view.facelets.tag.composite;
+
+import javax.el.MethodExpression;
+import javax.faces.component.ActionSource;
+import javax.faces.component.ActionSource2;
+import javax.faces.view.facelets.ComponentConfig;
+import javax.faces.view.facelets.ComponentHandler;
+import javax.faces.view.facelets.FaceletContext;
+import javax.faces.view.facelets.MetaRule;
+import javax.faces.view.facelets.MetaRuleset;
+import javax.faces.view.facelets.Metadata;
+import javax.faces.view.facelets.MetadataTarget;
+import javax.faces.view.facelets.TagAttribute;
+
+import org.apache.myfaces.view.facelets.tag.jsf.ActionSourceRule;
+
+public class SimpleComponentTagHandler extends ComponentHandler
+{
+
+    public SimpleComponentTagHandler(ComponentConfig config)
+    {
+        super(config);
+        // TODO Auto-generated constructor stub
+    }
+
+    @Override
+    protected MetaRuleset createMetaRuleset(Class type)
+    {
+        return super.createMetaRuleset(type).addRule(new CustomMethodRule());
+    }
+
+    public final class CustomMethodRule extends MetaRule {
+
+        @Override
+        public Metadata applyRule(String name, TagAttribute attribute,
+                MetadataTarget meta)
+        {
+            if (meta.isTargetInstanceOf(SimpleComponent.class))
+            {
+                if ("customMethod".equals(name))
+                {
+                    return new SimpleMethodMapper(attribute);
+                }
+            }
+            return null;
+        }
+        
+    }
+    
+    final static class SimpleMethodMapper extends Metadata
+    {
+        private final TagAttribute _attr;
+        
+        public final static Class<?>[] CUSTOM_METHOD_SIG = new Class[]{String.class};
+
+        public SimpleMethodMapper(TagAttribute attr)
+        {
+            this._attr = attr;
+        }
+
+        public void applyMetadata(FaceletContext ctx, Object instance)
+        {
+            MethodExpression expr = _attr.getMethodExpression(ctx, null, CUSTOM_METHOD_SIG);
+            ((SimpleComponent) instance).setCustomMethod(expr);
+        }
+    }
+
+}

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionListenerNoTarget.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionListenerNoTarget.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionListenerNoTarget.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionListenerNoTarget.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,33 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="actionListener"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:simpleAttributeActionListenerNoTarget id="simpleAttributeActionMethodExpressionNoTarget" actionListener="#{cc.attrs.actionListener}"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionListenerNoTarget2.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionListenerNoTarget2.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionListenerNoTarget2.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionListenerNoTarget2.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,33 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="actionListener" targets="compositeAttributeMethodExpressionNoTarget"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:compositeAttributeActionListenerNoTarget2_1 id="compositeAttributeMethodExpressionNoTarget"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionListenerNoTarget2_1.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionListenerNoTarget2_1.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionListenerNoTarget2_1.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionListenerNoTarget2_1.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,33 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="actionListener" targets="simpleAttributeMethodExpressionNoTarget"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:simpleAttributeActionListenerNoTarget id="simpleAttributeMethodExpressionNoTarget"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionListenerTarget.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionListenerTarget.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionListenerTarget.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionListenerTarget.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,33 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="actionListener" targets="simpleAttributeMethodExpressionTarget"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:simpleAttributeActionListenerTarget id="simpleAttributeMethodExpressionTarget"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionListenerTarget2.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionListenerTarget2.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionListenerTarget2.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionListenerTarget2.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,34 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="actionListener" targets="simpleAttributeMethodExpressionTarget"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:simpleAttributeActionListenerTarget2 id="simpleAttributeMethodExpressionTarget"/>
+    <testComposite:simpleAttributeActionListenerTarget2 id="simpleAttributeMethodExpressionNoTarget" actionListener="#{cc.attrs.actionListener}"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionMethodExpressionNoTarget.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionMethodExpressionNoTarget.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionMethodExpressionNoTarget.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionMethodExpressionNoTarget.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,33 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="action"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:simpleAttributeActionMethodExpressionNoTarget id="simpleAttributeActionMethodExpressionNoTarget" action="#{cc.attrs.action}"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionMethodExpressionNoTarget2.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionMethodExpressionNoTarget2.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionMethodExpressionNoTarget2.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionMethodExpressionNoTarget2.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,33 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="action" targets="compositeAttributeMethodExpressionNoTarget"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:compositeAttributeActionMethodExpressionNoTarget2_1 id="compositeAttributeMethodExpressionNoTarget"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionMethodExpressionNoTarget2_1.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionMethodExpressionNoTarget2_1.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionMethodExpressionNoTarget2_1.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionMethodExpressionNoTarget2_1.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,33 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="action" targets="simpleAttributeMethodExpressionNoTarget"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:simpleAttributeActionMethodExpressionNoTarget id="simpleAttributeMethodExpressionNoTarget"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionMethodExpressionTarget.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionMethodExpressionTarget.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionMethodExpressionTarget.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionMethodExpressionTarget.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,33 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="action" targets="simpleAttributeMethodExpressionTarget"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:simpleAttributeActionMethodExpressionTarget id="simpleAttributeMethodExpressionTarget"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionMethodExpressionTarget2.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionMethodExpressionTarget2.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionMethodExpressionTarget2.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeActionMethodExpressionTarget2.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,34 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="action" targets="simpleAttributeMethodExpressionTarget"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:simpleAttributeActionMethodExpressionTarget2 id="simpleAttributeMethodExpressionTarget"/>
+    <testComposite:simpleAttributeActionMethodExpressionTarget2 id="simpleAttributeMethodExpressionNoTarget" action="#{cc.attrs.action}"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeMethodExpressionNoTarget.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeMethodExpressionNoTarget.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeMethodExpressionNoTarget.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeMethodExpressionNoTarget.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,33 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="customMethod" method-signature="String doSomething(String)"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:simpleAttributeMethodExpressionNoTarget id="simpleAttributeMethodExpressionNoTarget" customMethod="#{cc.attrs.customMethod}"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeMethodExpressionNoTarget2.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeMethodExpressionNoTarget2.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeMethodExpressionNoTarget2.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeMethodExpressionNoTarget2.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,33 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="customMethod" method-signature="String doSomething(String)" targets="compositeAttributeMethodExpressionNoTarget"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:compositeAttributeMethodExpressionNoTarget2_1 id="compositeAttributeMethodExpressionNoTarget"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeMethodExpressionNoTarget2_1.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeMethodExpressionNoTarget2_1.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeMethodExpressionNoTarget2_1.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeMethodExpressionNoTarget2_1.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,33 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="customMethod" method-signature="String doSomething(String)" targets="simpleAttributeMethodExpressionNoTarget"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:simpleAttributeMethodExpressionNoTarget id="simpleAttributeMethodExpressionNoTarget"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeMethodExpressionTarget2.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeMethodExpressionTarget2.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeMethodExpressionTarget2.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeMethodExpressionTarget2.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,34 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="customMethod" method-signature="String doSomething(String)" targets="simpleAttributeMethodExpressionTarget"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:simpleAttributeMethodExpressionTarget2 id="simpleAttributeMethodExpressionTarget"/>
+    <testComposite:simpleAttributeMethodExpressionTarget2 id="simpleAttributeMethodExpressionNoTarget" customMethod="#{cc.attrs.customMethod}"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValidatorNoTarget.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValidatorNoTarget.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValidatorNoTarget.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValidatorNoTarget.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,33 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="validator"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:simpleAttributeValidatorNoTarget id="simpleAttributeActionMethodExpressionNoTarget" validator="#{cc.attrs.validator}"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValidatorNoTarget2.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValidatorNoTarget2.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValidatorNoTarget2.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValidatorNoTarget2.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,33 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="validator" targets="compositeAttributeMethodExpressionNoTarget"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:compositeAttributeValidatorNoTarget2_1 id="compositeAttributeMethodExpressionNoTarget"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValidatorNoTarget2_1.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValidatorNoTarget2_1.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValidatorNoTarget2_1.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValidatorNoTarget2_1.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,33 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="validator" targets="simpleAttributeMethodExpressionNoTarget"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:simpleAttributeValidatorNoTarget id="simpleAttributeMethodExpressionNoTarget"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValidatorTarget.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValidatorTarget.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValidatorTarget.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValidatorTarget.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,33 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="validator" targets="simpleAttributeMethodExpressionTarget"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:simpleAttributeValidatorTarget id="simpleAttributeMethodExpressionTarget"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValidatorTarget2.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValidatorTarget2.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValidatorTarget2.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValidatorTarget2.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,34 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="validator" targets="simpleAttributeMethodExpressionTarget"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:simpleAttributeValidatorTarget2 id="simpleAttributeMethodExpressionTarget"/>
+    <testComposite:simpleAttributeValidatorTarget2 id="simpleAttributeMethodExpressionNoTarget" validator="#{cc.attrs.validator}"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValueChangeListenerNoTarget.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValueChangeListenerNoTarget.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValueChangeListenerNoTarget.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValueChangeListenerNoTarget.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,33 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="valueChangeListener"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:simpleAttributeValueChangeListenerNoTarget id="simpleAttributeActionMethodExpressionNoTarget" valueChangeListener="#{cc.attrs.valueChangeListener}"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValueChangeListenerNoTarget2.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValueChangeListenerNoTarget2.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValueChangeListenerNoTarget2.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValueChangeListenerNoTarget2.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,33 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="valueChangeListener" targets="compositeAttributeMethodExpressionNoTarget"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:compositeAttributeValueChangeListenerNoTarget2_1 id="compositeAttributeMethodExpressionNoTarget"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValueChangeListenerNoTarget2_1.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValueChangeListenerNoTarget2_1.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValueChangeListenerNoTarget2_1.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValueChangeListenerNoTarget2_1.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,33 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="valueChangeListener" targets="simpleAttributeMethodExpressionNoTarget"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:simpleAttributeValueChangeListenerNoTarget id="simpleAttributeMethodExpressionNoTarget"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValueChangeListenerTarget.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValueChangeListenerTarget.xhtml?rev=1152504&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValueChangeListenerTarget.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/compositeAttributeValueChangeListenerTarget.xhtml Sat Jul 30 20:11:17 2011
@@ -0,0 +1,33 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: defineInclude.xml 804043 2009-08-13 22:08:44Z lu4242 $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:composite="http://java.sun.com/jsf/composite"
+    xmlns:tc="http://myfaces.apache.org/testComponent"
+    xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+    <composite:attribute name="valueChangeListener" targets="simpleAttributeMethodExpressionTarget"/>
+</composite:interface>
+<composite:implementation>
+    <testComposite:simpleAttributeValueChangeListenerTarget id="simpleAttributeMethodExpressionTarget"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file