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 2017/02/24 00:31:46 UTC

svn commit: r1784219 - in /myfaces/core/branches/2.1.x/impl/src: main/java/org/apache/myfaces/view/facelets/el/ main/java/org/apache/myfaces/view/facelets/tag/ test/java/org/apache/myfaces/view/facelets/tag/composite/ test/resources/org/apache/myfaces/...

Author: lu4242
Date: Fri Feb 24 00:31:46 2017
New Revision: 1784219

URL: http://svn.apache.org/viewvc?rev=1784219&view=rev
Log:
MYFACES-4099 - Allow resolve #{cc} inside templates called from a composite component

Added:
    myfaces/core/branches/2.1.x/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentCConIncludeTestCase.java   (with props)
    myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude1.xhtml   (with props)
    myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude1_1.xhtml   (with props)
    myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude1_2.xhtml   (with props)
    myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude2.xhtml   (with props)
    myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude2_1.xhtml   (with props)
    myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/testCConInclude1.xhtml   (with props)
    myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/testCConInclude2.xhtml   (with props)
Modified:
    myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/el/ELText.java
    myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/el/LocationMethodExpression.java
    myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/el/LocationValueExpression.java
    myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/el/LocationValueExpressionUEL.java
    myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/tag/TagAttributeImpl.java

Modified: myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/el/ELText.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/el/ELText.java?rev=1784219&r1=1784218&r2=1784219&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/el/ELText.java (original)
+++ myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/el/ELText.java Fri Feb 24 00:31:46 2017
@@ -268,6 +268,16 @@ public class ELText
                 // expression belongs to.
                 if ((this.capabilities & EL_CC) != 0)
                 {
+                    UIComponent cc = actx.getFaceletCompositionContext().getCompositeComponentFromStack();
+                    if (cc != null)
+                    {
+                        Location location = (Location) cc.getAttributes().get(CompositeComponentELUtils.LOCATION_KEY);
+                        if (location != null)
+                        {
+                            return new ELTextVariable(((LocationValueExpression)cached.ve).apply(
+                                    actx.getFaceletCompositionContext().getCompositeComponentLevel(), location));
+                        }
+                    }
                     return new ELTextVariable(((LocationValueExpression)cached.ve).apply(
                             actx.getFaceletCompositionContext().getCompositeComponentLevel()));
                 }

Modified: myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/el/LocationMethodExpression.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/el/LocationMethodExpression.java?rev=1784219&r1=1784218&r2=1784219&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/el/LocationMethodExpression.java (original)
+++ myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/el/LocationMethodExpression.java Fri Feb 24 00:31:46 2017
@@ -91,6 +91,18 @@ public class LocationMethodExpression ex
         }
     }
     
+    public LocationMethodExpression apply(int newCCLevel, Location newLocation)
+    {
+        if(this.ccLevel == newCCLevel && this.location.getPath().equals(newLocation.getPath()))
+        {
+            return this;
+        }
+        else
+        {
+            return new LocationMethodExpression(newLocation, this.delegate, newCCLevel);
+        }
+    }
+    
     @Override
     public MethodInfo getMethodInfo(ELContext context)
     {

Modified: myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/el/LocationValueExpression.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/el/LocationValueExpression.java?rev=1784219&r1=1784218&r2=1784219&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/el/LocationValueExpression.java (original)
+++ myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/el/LocationValueExpression.java Fri Feb 24 00:31:46 2017
@@ -96,6 +96,18 @@ public class LocationValueExpression ext
         }
     }
     
+    public LocationValueExpression apply(int newCCLevel, Location newLocation)
+    {
+        if(this.ccLevel == newCCLevel && this.location.getPath().equals(newLocation.getPath()))
+        {
+            return this;
+        }
+        else
+        {
+            return new LocationValueExpression(newLocation, this.delegate, newCCLevel);
+        }
+    }
+    
     @Override
     public Class<?> getExpectedType()
     {

Modified: myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/el/LocationValueExpressionUEL.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/el/LocationValueExpressionUEL.java?rev=1784219&r1=1784218&r2=1784219&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/el/LocationValueExpressionUEL.java (original)
+++ myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/el/LocationValueExpressionUEL.java Fri Feb 24 00:31:46 2017
@@ -62,6 +62,18 @@ public class LocationValueExpressionUEL
         }
     }
     
+    public LocationValueExpression apply(int newCCLevel, Location newLocation)
+    {
+        if(this.ccLevel == newCCLevel && this.location.getPath().equals(newLocation.getPath()))
+        {
+            return this;
+        }
+        else
+        {
+            return new LocationValueExpressionUEL(newLocation, this.delegate, newCCLevel);
+        }
+    }
+    
     @Override
     public ValueReference getValueReference(ELContext context)
     {

Modified: myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/tag/TagAttributeImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/tag/TagAttributeImpl.java?rev=1784219&r1=1784218&r2=1784219&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/tag/TagAttributeImpl.java (original)
+++ myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/tag/TagAttributeImpl.java Fri Feb 24 00:31:46 2017
@@ -24,6 +24,7 @@ import javax.el.ELException;
 import javax.el.ExpressionFactory;
 import javax.el.MethodExpression;
 import javax.el.ValueExpression;
+import javax.faces.component.UIComponent;
 import javax.faces.view.Location;
 import javax.faces.view.facelets.FaceletContext;
 import javax.faces.view.facelets.TagAttribute;
@@ -220,6 +221,17 @@ public final class TagAttributeImpl exte
                     if ((this.capabilities & EL_CC) != 0 &&
                         localCachedExpression[(i*3)+2] instanceof LocationMethodExpression)
                     {
+                        UIComponent cc = actx.getFaceletCompositionContext().getCompositeComponentFromStack();
+                        if (cc != null)
+                        {
+                            Location location = (Location) cc.getAttributes().get(
+                                    CompositeComponentELUtils.LOCATION_KEY);
+                            if (location != null)
+                            {
+                                return ((LocationMethodExpression)localCachedExpression[(i*3)+2]).apply(
+                                        actx.getFaceletCompositionContext().getCompositeComponentLevel(), location);
+                            }
+                        }
                         return ((LocationMethodExpression)localCachedExpression[(i*3)+2]).apply(
                                 actx.getFaceletCompositionContext().getCompositeComponentLevel());
                     }
@@ -287,7 +299,18 @@ public final class TagAttributeImpl exte
                 // (see MYFACES-2561 for details)
                 if ((this.capabilities & EL_CC) != 0)
                 {
-                    methodExpression = new LocationMethodExpression(getLocation(), methodExpression, 
+                    Location currentLocation = getLocation();
+                    Location ccLocation = (Location) actx.getFaceletCompositionContext().
+                            getCompositeComponentFromStack().getAttributes().get(
+                                    CompositeComponentELUtils.LOCATION_KEY);
+                    if (ccLocation != null && !ccLocation.getPath().equals(currentLocation.getPath()))
+                    {
+                        // #{cc} from a template called from inside a composite component, disable caching on 
+                        // this expression. The reason is we need to change the Location object used as
+                        // reference as the one in the stack, and that depends on the template hierarchy.
+                        currentLocation = ccLocation;
+                    }
+                    methodExpression = new LocationMethodExpression(currentLocation, methodExpression, 
                             actx.getFaceletCompositionContext().getCompositeComponentLevel());
                 }
             }
@@ -462,6 +485,17 @@ public final class TagAttributeImpl exte
                 // If #{cc} recalculate the composite component level
                 if ((this.capabilities & EL_CC) != 0)
                 {
+                    UIComponent cc = actx.getFaceletCompositionContext().getCompositeComponentFromStack();
+                    if (cc != null)
+                    {
+                        Location location = (Location) cc.getAttributes().get(
+                                CompositeComponentELUtils.LOCATION_KEY);
+                        if (location != null)
+                        {
+                            return ((LocationValueExpression)localCachedExpression[1]).apply(
+                                    actx.getFaceletCompositionContext().getCompositeComponentLevel(), location);
+                        }
+                    }
                     return ((LocationValueExpression)localCachedExpression[1]).apply(
                             actx.getFaceletCompositionContext().getCompositeComponentLevel());
                 }
@@ -472,6 +506,17 @@ public final class TagAttributeImpl exte
                 // If #{cc} recalculate the composite component level
                 if ((this.capabilities & EL_CC) != 0)
                 {
+                    UIComponent cc = actx.getFaceletCompositionContext().getCompositeComponentFromStack();
+                    if (cc != null)
+                    {
+                        Location location = (Location) cc.getAttributes().get(
+                                CompositeComponentELUtils.LOCATION_KEY);
+                        if (location != null)
+                        {
+                            return ((LocationValueExpression)localCachedExpression[1]).apply(
+                                    actx.getFaceletCompositionContext().getCompositeComponentLevel(), location);
+                        }
+                    }
                     return ((LocationValueExpression)localCachedExpression[1]).apply(
                             actx.getFaceletCompositionContext().getCompositeComponentLevel());
                 }
@@ -515,14 +560,30 @@ public final class TagAttributeImpl exte
             // (see MYFACES-2561 for details)
             if ((this.capabilities & EL_CC) != 0)
             {
+                // In MYFACES-4099 it was found that #{cc} could happen outside a composite component. In that
+                // case, getLocation() will point to the template. To solve the problem, it is better to get
+                // the location of the composite component from the stack directly, but only when the path
+                // is different.
+                Location currentLocation = getLocation();
+                Location ccLocation = (Location) actx.getFaceletCompositionContext().
+                        getCompositeComponentFromStack().getAttributes().get(
+                                CompositeComponentELUtils.LOCATION_KEY);
+                if (ccLocation != null && !ccLocation.getPath().equals(currentLocation.getPath()))
+                {
+                    // #{cc} from a template called from inside a composite component, disable caching on 
+                    // this expression. The reason is we need to change the Location object used as
+                    // reference as the one in the stack, and that depends on the template hierarchy.
+                    //cacheable = false;
+                    currentLocation = ccLocation;
+                }
                 if (ExternalSpecifications.isUnifiedELAvailable())
                 {
-                    valueExpression = new LocationValueExpressionUEL(getLocation(), valueExpression, 
+                    valueExpression = new LocationValueExpressionUEL(currentLocation, valueExpression, 
                             actx.getFaceletCompositionContext().getCompositeComponentLevel());
                 }
                 else
                 {
-                    valueExpression = new LocationValueExpression(getLocation(), valueExpression, 
+                    valueExpression = new LocationValueExpression(currentLocation, valueExpression, 
                             actx.getFaceletCompositionContext().getCompositeComponentLevel());
                 }
             }

Added: myfaces/core/branches/2.1.x/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentCConIncludeTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentCConIncludeTestCase.java?rev=1784219&view=auto
==============================================================================
--- myfaces/core/branches/2.1.x/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentCConIncludeTestCase.java (added)
+++ myfaces/core/branches/2.1.x/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentCConIncludeTestCase.java Fri Feb 24 00:31:46 2017
@@ -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 java.io.StringWriter;
+
+import javax.el.ExpressionFactory;
+import javax.faces.component.UIViewRoot;
+
+import org.apache.myfaces.test.mock.MockResponseWriter;
+import org.apache.myfaces.view.facelets.FaceletTestCase;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class CompositeComponentCConIncludeTestCase extends FaceletTestCase
+{
+
+    @Override
+    protected void setupComponents() throws Exception
+    {
+        super.setupComponents();
+    }
+    
+    @Override
+    protected ExpressionFactory createExpressionFactory()
+    {
+        return new org.apache.el.ExpressionFactoryImpl();
+    }
+    
+    @Test
+    public void testCCOnInclude1() throws Exception
+    {
+        UIViewRoot root = facesContext.getViewRoot();
+        vdl.buildView(facesContext, root, "testCConInclude1.xhtml");
+
+        //UIComponent panelGroup1 = root.findComponent("testGroup1");
+        //Assert.assertNotNull(panelGroup1);
+
+        StringWriter sw = new StringWriter();
+        MockResponseWriter mrw = new MockResponseWriter(sw);
+        facesContext.setResponseWriter(mrw);
+        
+        root.encodeAll(facesContext);
+        sw.flush();
+        Assert.assertTrue(sw.toString().contains("value1"));
+        Assert.assertTrue(sw.toString().contains("value2"));
+        Assert.assertTrue(sw.toString().contains("value3"));
+    }
+    
+    @Test
+    public void testCCOnInclude2() throws Exception
+    {
+        UIViewRoot root = facesContext.getViewRoot();
+        vdl.buildView(facesContext, root, "testCConInclude2.xhtml");
+
+        //UIComponent panelGroup1 = root.findComponent("testGroup1");
+        //Assert.assertNotNull(panelGroup1);
+
+        StringWriter sw = new StringWriter();
+        MockResponseWriter mrw = new MockResponseWriter(sw);
+        facesContext.setResponseWriter(mrw);
+        
+        root.encodeAll(facesContext);
+        sw.flush();
+        Assert.assertTrue(sw.toString().contains("value1"));
+        Assert.assertTrue(sw.toString().contains("value2"));
+        Assert.assertTrue(sw.toString().contains("value3"));
+    }
+}

Propchange: myfaces/core/branches/2.1.x/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentCConIncludeTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/core/branches/2.1.x/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentCConIncludeTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude1.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude1.xhtml?rev=1784219&view=auto
==============================================================================
--- myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude1.xhtml (added)
+++ myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude1.xhtml Fri Feb 24 00:31:46 2017
@@ -0,0 +1,32 @@
+<!--
+ 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:ui="http://java.sun.com/jsf/facelets"
+	xmlns:composite="http://java.sun.com/jsf/composite">
+<head>
+    <title></title>
+</head>
+<body>
+<composite:interface>
+</composite:interface>
+<composite:implementation>
+    <ui:include src="ccOnInclude1_1.xhtml"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Propchange: myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude1.xhtml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude1_1.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude1_1.xhtml?rev=1784219&view=auto
==============================================================================
--- myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude1_1.xhtml (added)
+++ myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude1_1.xhtml Fri Feb 24 00:31:46 2017
@@ -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:ui="http://java.sun.com/jsf/facelets"
+        xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+    <title></title>
+</head>
+<body>
+<ui:composition>
+    <div>#{cc.attrs.property1}</div>
+    <testComposite:ccOnInclude1_2 property22="#{cc.attrs.property2}">
+        #{cc.attrs.property3}
+    </testComposite:ccOnInclude1_2>
+</ui:composition>
+</body>
+</html>
\ No newline at end of file

Propchange: myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude1_1.xhtml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude1_2.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude1_2.xhtml?rev=1784219&view=auto
==============================================================================
--- myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude1_2.xhtml (added)
+++ myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude1_2.xhtml Fri Feb 24 00:31:46 2017
@@ -0,0 +1,32 @@
+<!--
+ 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">
+<head>
+</head>
+<body>
+<composite:interface>
+</composite:interface>
+<composite:implementation>
+    <h:outputText id="text" value="#{cc.attrs.property22}"/>
+    <br/>
+    <composite:insertChildren/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Propchange: myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude1_2.xhtml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude2.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude2.xhtml?rev=1784219&view=auto
==============================================================================
--- myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude2.xhtml (added)
+++ myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude2.xhtml Fri Feb 24 00:31:46 2017
@@ -0,0 +1,32 @@
+<!--
+ 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:ui="http://java.sun.com/jsf/facelets"
+	xmlns:composite="http://java.sun.com/jsf/composite">
+<head>
+    <title></title>
+</head>
+<body>
+<composite:interface>
+</composite:interface>
+<composite:implementation>
+    <ui:include src="ccOnInclude2_1.xhtml"/>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file

Propchange: myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude2.xhtml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude2_1.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude2_1.xhtml?rev=1784219&view=auto
==============================================================================
--- myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude2_1.xhtml (added)
+++ myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude2_1.xhtml Fri Feb 24 00:31:46 2017
@@ -0,0 +1,30 @@
+<!--
+ 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:ui="http://java.sun.com/jsf/facelets"
+        xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+    <title></title>
+</head>
+<body>
+<ui:composition>
+    <ui:include src="ccOnInclude1_1.xhtml"/>
+</ui:composition>
+</body>
+</html>
\ No newline at end of file

Propchange: myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/resources/testComposite/ccOnInclude2_1.xhtml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/testCConInclude1.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/testCConInclude1.xhtml?rev=1784219&view=auto
==============================================================================
--- myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/testCConInclude1.xhtml (added)
+++ myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/testCConInclude1.xhtml Fri Feb 24 00:31:46 2017
@@ -0,0 +1,31 @@
+<!--
+ 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:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<h:panelGroup id="testGroup">
+<testComposite:ccOnInclude1 property1="value1" 
+                            property2="value2" 
+                            property3="value3">
+</testComposite:ccOnInclude1>
+</h:panelGroup>
+</body>
+</html>
\ No newline at end of file

Propchange: myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/testCConInclude1.xhtml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/testCConInclude2.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/testCConInclude2.xhtml?rev=1784219&view=auto
==============================================================================
--- myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/testCConInclude2.xhtml (added)
+++ myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/testCConInclude2.xhtml Fri Feb 24 00:31:46 2017
@@ -0,0 +1,31 @@
+<!--
+ 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:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<h:panelGroup id="testGroup">
+<testComposite:ccOnInclude1 property1="value1" 
+                            property2="value2" 
+                            property3="value3">
+</testComposite:ccOnInclude1>
+</h:panelGroup>
+</body>
+</html>
\ No newline at end of file

Propchange: myfaces/core/branches/2.1.x/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/testCConInclude2.xhtml
------------------------------------------------------------------------------
    svn:eol-style = native