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 2010/01/29 01:34:58 UTC
svn commit: r904323 - in /myfaces/current20/test-webapp/webapp/src/main:
java/org/apache/myfaces/testcc/ java/org/apache/myfaces/testif/ webapp/
webapp/WEB-INF/ webapp/resources/testComposite/
Author: lu4242
Date: Fri Jan 29 00:34:58 2010
New Revision: 904323
URL: http://svn.apache.org/viewvc?rev=904323&view=rev
Log:
add c:if and composite component tests
Added:
myfaces/current20/test-webapp/webapp/src/main/java/org/apache/myfaces/testcc/
myfaces/current20/test-webapp/webapp/src/main/java/org/apache/myfaces/testcc/InvokeOnComponentChangeStyleBean.java
myfaces/current20/test-webapp/webapp/src/main/java/org/apache/myfaces/testif/
myfaces/current20/test-webapp/webapp/src/main/java/org/apache/myfaces/testif/HelloWorldIfBean.java
myfaces/current20/test-webapp/webapp/src/main/webapp/cc1.xhtml
myfaces/current20/test-webapp/webapp/src/main/webapp/cc2.xhtml
myfaces/current20/test-webapp/webapp/src/main/webapp/cc3.xhtml
myfaces/current20/test-webapp/webapp/src/main/webapp/cc4.xhtml
myfaces/current20/test-webapp/webapp/src/main/webapp/if1.xhtml
myfaces/current20/test-webapp/webapp/src/main/webapp/resources/testComposite/
myfaces/current20/test-webapp/webapp/src/main/webapp/resources/testComposite/compositeInsertChildren.xhtml
myfaces/current20/test-webapp/webapp/src/main/webapp/resources/testComposite/simpleInsertChildren.xhtml
myfaces/current20/test-webapp/webapp/src/main/webapp/resources/testComposite/simpleInsertFacet.xhtml
Modified:
myfaces/current20/test-webapp/webapp/src/main/webapp/WEB-INF/faces-config.xml
myfaces/current20/test-webapp/webapp/src/main/webapp/WEB-INF/web.xml
Added: myfaces/current20/test-webapp/webapp/src/main/java/org/apache/myfaces/testcc/InvokeOnComponentChangeStyleBean.java
URL: http://svn.apache.org/viewvc/myfaces/current20/test-webapp/webapp/src/main/java/org/apache/myfaces/testcc/InvokeOnComponentChangeStyleBean.java?rev=904323&view=auto
==============================================================================
--- myfaces/current20/test-webapp/webapp/src/main/java/org/apache/myfaces/testcc/InvokeOnComponentChangeStyleBean.java (added)
+++ myfaces/current20/test-webapp/webapp/src/main/java/org/apache/myfaces/testcc/InvokeOnComponentChangeStyleBean.java Fri Jan 29 00:34:58 2010
@@ -0,0 +1,82 @@
+/*
+ * 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.testcc;
+
+import javax.faces.component.ContextCallback;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+public class InvokeOnComponentChangeStyleBean {
+
+ private String clientId;
+
+ private String currentValue;
+
+ public String getCurrentValue() {
+ return currentValue;
+ }
+
+ public void setCurrentValue(String currentValue) {
+ this.currentValue = currentValue;
+ }
+
+ public String getClientId() {
+ return clientId;
+ }
+
+ public void setClientId(String clientId) {
+ this.clientId = clientId;
+ }
+
+ int countInvoke = 0;
+
+ public void invokeSetValueOnComponent(ActionEvent evt) {
+
+ ContextCallback contextCallback = new LoadInputValue();
+
+ FacesContext faces = FacesContext.getCurrentInstance();
+ UIViewRoot root = faces.getViewRoot();
+
+ boolean found = root.invokeOnComponent(faces, clientId, contextCallback);
+
+ if (!found)
+ this.setCurrentValue(clientId + " not found!");
+
+ countInvoke++;
+ System.out.println("COUNT:"+countInvoke);
+ }
+
+ public class LoadInputValue implements ContextCallback
+ {
+
+ public void invokeContextCallback(FacesContext ctx, UIComponent c)
+ {
+ if (c instanceof UIInput)
+ {
+ UIInput input = (UIInput) c;
+ Object value = input.getValue();
+ c.getAttributes().put("style", "background:red");
+ currentValue = (String) input.getValue();
+ }
+ }
+ }
+}
Added: myfaces/current20/test-webapp/webapp/src/main/java/org/apache/myfaces/testif/HelloWorldIfBean.java
URL: http://svn.apache.org/viewvc/myfaces/current20/test-webapp/webapp/src/main/java/org/apache/myfaces/testif/HelloWorldIfBean.java?rev=904323&view=auto
==============================================================================
--- myfaces/current20/test-webapp/webapp/src/main/java/org/apache/myfaces/testif/HelloWorldIfBean.java (added)
+++ myfaces/current20/test-webapp/webapp/src/main/java/org/apache/myfaces/testif/HelloWorldIfBean.java Fri Jan 29 00:34:58 2010
@@ -0,0 +1,34 @@
+package org.apache.myfaces.testif;
+
+import javax.faces.event.ActionEvent;
+
+public class HelloWorldIfBean
+{
+ public boolean toogle;
+
+ public HelloWorldIfBean()
+ {
+ super();
+ this.toogle = false;
+ }
+
+ public boolean isToogle()
+ {
+ return toogle;
+ }
+
+ public void setToogle(boolean toogle)
+ {
+ this.toogle = toogle;
+ }
+
+ public void toogleValue(ActionEvent evt)
+ {
+ toogle = !toogle;
+ }
+
+ public void dummy(ActionEvent evt)
+ {
+
+ }
+}
Modified: myfaces/current20/test-webapp/webapp/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/current20/test-webapp/webapp/src/main/webapp/WEB-INF/faces-config.xml?rev=904323&r1=904322&r2=904323&view=diff
==============================================================================
--- myfaces/current20/test-webapp/webapp/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/current20/test-webapp/webapp/src/main/webapp/WEB-INF/faces-config.xml Fri Jan 29 00:34:58 2010
@@ -22,6 +22,16 @@
<managed-bean-class>org.apache.myfaces.flash.HelloWorldFlashBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>helloWorldIfBean</managed-bean-name>
+ <managed-bean-class>org.apache.myfaces.testif.HelloWorldIfBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>invokeOnComponentChangeStyle</managed-bean-name>
+ <managed-bean-class>org.apache.myfaces.testcc.InvokeOnComponentChangeStyleBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
<!-- navigation rules for helloWorld.jsp -->
<navigation-rule>
Modified: myfaces/current20/test-webapp/webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/current20/test-webapp/webapp/src/main/webapp/WEB-INF/web.xml?rev=904323&r1=904322&r2=904323&view=diff
==============================================================================
--- myfaces/current20/test-webapp/webapp/src/main/webapp/WEB-INF/web.xml (original)
+++ myfaces/current20/test-webapp/webapp/src/main/webapp/WEB-INF/web.xml Fri Jan 29 00:34:58 2010
@@ -144,7 +144,20 @@
</description>
<param-name>javax.faces.PARTIAL_STATE_SAVING_METHOD</param-name>
<param-value>false</param-value>
- </context-param>
+ </context-param>
+<!--
+ <context-param>
+ <param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ -->
+
+<!--
+ <context-param>
+ <param-name>javax.faces.PROJECT_STAGE</param-name>
+ <param-value>UnitTest</param-value>
+ </context-param>
+ -->
<!-- Extensions Filter -->
<!--
Added: myfaces/current20/test-webapp/webapp/src/main/webapp/cc1.xhtml
URL: http://svn.apache.org/viewvc/myfaces/current20/test-webapp/webapp/src/main/webapp/cc1.xhtml?rev=904323&view=auto
==============================================================================
--- myfaces/current20/test-webapp/webapp/src/main/webapp/cc1.xhtml (added)
+++ myfaces/current20/test-webapp/webapp/src/main/webapp/cc1.xhtml Fri Jan 29 00:34:58 2010
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!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:c="http://java.sun.com/jsp/jstl/core"
+ xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite"
+ >
+<h:head>
+</h:head>
+<h:body>
+ <p>TITLE</p>
+ <h:form id="mainForm">
+ <h:inputText value="#{invokeOnComponentChangeStyle.clientId}" />
+ <h:inputText value="#{invokeOnComponentChangeStyle.currentValue}" />
+ <h:commandButton value="Set Input Field Red" actionListener="#{invokeOnComponentChangeStyle.invokeSetValueOnComponent}"/>
+ <testComposite:simpleInsertChildren id="sic">
+ Mr.
+ <h:inputText id="name" value="John " />
+ Smith
+ </testComposite:simpleInsertChildren>
+ <h:commandButton value="Postback"/>
+ </h:form>
+</h:body>
+</html>
\ No newline at end of file
Added: myfaces/current20/test-webapp/webapp/src/main/webapp/cc2.xhtml
URL: http://svn.apache.org/viewvc/myfaces/current20/test-webapp/webapp/src/main/webapp/cc2.xhtml?rev=904323&view=auto
==============================================================================
--- myfaces/current20/test-webapp/webapp/src/main/webapp/cc2.xhtml (added)
+++ myfaces/current20/test-webapp/webapp/src/main/webapp/cc2.xhtml Fri Jan 29 00:34:58 2010
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!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:c="http://java.sun.com/jsp/jstl/core"
+ xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite"
+ >
+<h:head>
+</h:head>
+<h:body>
+ <p>TITLE</p>
+ <h:form id="mainForm">
+ <h:inputText value="#{invokeOnComponentChangeStyle.clientId}" />
+ <h:inputText value="#{invokeOnComponentChangeStyle.currentValue}" />
+ <h:commandButton value="Set Input Field Red" actionListener="#{invokeOnComponentChangeStyle.invokeSetValueOnComponent}"/>
+ <testComposite:compositeInsertChildren id="sic">
+ Mr1.
+ <h:inputText id="name" value="John " />
+ Smith1
+ </testComposite:compositeInsertChildren>
+ <h:commandButton value="Postback"/>
+ </h:form>
+</h:body>
+</html>
\ No newline at end of file
Added: myfaces/current20/test-webapp/webapp/src/main/webapp/cc3.xhtml
URL: http://svn.apache.org/viewvc/myfaces/current20/test-webapp/webapp/src/main/webapp/cc3.xhtml?rev=904323&view=auto
==============================================================================
--- myfaces/current20/test-webapp/webapp/src/main/webapp/cc3.xhtml (added)
+++ myfaces/current20/test-webapp/webapp/src/main/webapp/cc3.xhtml Fri Jan 29 00:34:58 2010
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!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:c="http://java.sun.com/jsp/jstl/core"
+ xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite"
+ >
+<h:head>
+</h:head>
+<h:body>
+ <p>TITLE</p>
+ <h:form id="mainForm">
+ <h:inputText value="#{invokeOnComponentChangeStyle.clientId}" />
+ <h:inputText value="#{invokeOnComponentChangeStyle.currentValue}" />
+ <h:commandButton value="Set Input Field Red" actionListener="#{invokeOnComponentChangeStyle.invokeSetValueOnComponent}"/>
+ <testComposite:simpleInsertFacet id="sif">
+ <f:facet name="header">
+ Name
+ <h:inputText id="name" value="John " />
+ LastName
+ <h:inputText id="name2" value="Doe " />
+ </f:facet>
+ </testComposite:simpleInsertFacet>
+ <h:commandButton value="Postback"/>
+ </h:form>
+</h:body>
+</html>
\ No newline at end of file
Added: myfaces/current20/test-webapp/webapp/src/main/webapp/cc4.xhtml
URL: http://svn.apache.org/viewvc/myfaces/current20/test-webapp/webapp/src/main/webapp/cc4.xhtml?rev=904323&view=auto
==============================================================================
--- myfaces/current20/test-webapp/webapp/src/main/webapp/cc4.xhtml (added)
+++ myfaces/current20/test-webapp/webapp/src/main/webapp/cc4.xhtml Fri Jan 29 00:34:58 2010
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!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:c="http://java.sun.com/jsp/jstl/core"
+ xmlns:testComposite="http://java.sun.com/jsf/composite/testComposite"
+ >
+<h:head>
+</h:head>
+<h:body>
+ <p>TITLE</p>
+ <h:form id="mainForm">
+ <h:panelGrid columns="2">
+ <h:outputText value="#{helloWorldIfBean.toogle}" />
+ <h:commandButton value="Toogle!" actionListener="#{helloWorldIfBean.toogleValue}"/>
+ <h:outputText value="Dummy" />
+ <h:commandButton value="Dummy" actionListener="#{helloWorldIfBean.dummy}"/>
+ </h:panelGrid>
+
+ <h:inputText value="#{invokeOnComponentChangeStyle.clientId}" />
+ <h:inputText value="#{invokeOnComponentChangeStyle.currentValue}" />
+ <h:commandButton value="Set Input Field Red" actionListener="#{invokeOnComponentChangeStyle.invokeSetValueOnComponent}"/>
+
+ <testComposite:simpleInsertChildren id="sic">
+ <!--
+ <testComposite:simpleInsertFacet id="sif">
+ <f:facet name="header">
+ Name
+ <h:inputText id="name" value="John " />
+ LastName
+ <h:inputText id="name2" value="Doe " />
+ </f:facet>
+ </testComposite:simpleInsertFacet>
+
+ <c:if test="#{helloWorldIfBean.toogle}">
+ <p>Hello World Transient</p>
+ <h:outputText value="Hello World Component"/>
+ </c:if>
+ <testComposite:simpleInsertFacet id="sif2">
+ <f:facet name="header">
+ Name
+ </f:facet>
+ </testComposite:simpleInsertFacet>
+ <testComposite:simpleInsertFacet id="sif3">
+ <f:facet name="header">
+ Hello
+ <c:if test="#{helloWorldIfBean.toogle}">
+ Name
+ <h:inputText id="name" value="John " />
+ </c:if>
+ <h:outputText value="Bye"/>
+ </f:facet>
+ </testComposite:simpleInsertFacet>
+ -->
+ <testComposite:simpleInsertFacet id="sif4">
+ <f:facet name="header">
+ Name
+ <c:if test="#{helloWorldIfBean.toogle}"><h:inputText id="name" value="John " /></c:if>
+ </f:facet>
+ </testComposite:simpleInsertFacet>
+ </testComposite:simpleInsertChildren>
+ <h:commandButton value="Postback"/>
+ </h:form>
+</h:body>
+</html>
\ No newline at end of file
Added: myfaces/current20/test-webapp/webapp/src/main/webapp/if1.xhtml
URL: http://svn.apache.org/viewvc/myfaces/current20/test-webapp/webapp/src/main/webapp/if1.xhtml?rev=904323&view=auto
==============================================================================
--- myfaces/current20/test-webapp/webapp/src/main/webapp/if1.xhtml (added)
+++ myfaces/current20/test-webapp/webapp/src/main/webapp/if1.xhtml Fri Jan 29 00:34:58 2010
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!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:c="http://java.sun.com/jsp/jstl/core"
+ >
+<h:head>
+</h:head>
+<h:body>
+<p>TITLE</p>
+<h:form id="mainForm">
+ <h:panelGrid columns="2">
+ <h:outputText value="#{helloWorldIfBean.toogle}" />
+ <h:commandButton value="Toogle!" actionListener="#{helloWorldIfBean.toogleValue}"/>
+ <h:outputText value="Dummy" />
+ <h:commandButton value="Dummy" actionListener="#{helloWorldIfBean.dummy}"/>
+ </h:panelGrid>
+ <c:if test="#{helloWorldIfBean.toogle}">
+ <p>Hello World Transient</p>
+ <h:outputText value="Hello World Component"/>
+ </c:if>
+ <h:panelGrid columns="2">
+ <h:outputLabel for="outname" value="Name: " />
+ <h:outputText id="outname" value="#{helloWorld.name}"/>
+ <h:outputLabel for="inname" value="Please enter your name" />
+ <h:inputText id="inname" value="#{helloWorld.name}"/>
+ <h:commandButton type="button" value="Ajax Update">
+ <f:ajax execute="mainForm" render="outname"/>
+ </h:commandButton>
+ <h:commandButton value="Normal Submit"/>
+ <h:messages showDetail="true" showSummary="false"/>
+ </h:panelGrid>
+</h:form>
+</h:body>
+</html>
\ No newline at end of file
Added: myfaces/current20/test-webapp/webapp/src/main/webapp/resources/testComposite/compositeInsertChildren.xhtml
URL: http://svn.apache.org/viewvc/myfaces/current20/test-webapp/webapp/src/main/webapp/resources/testComposite/compositeInsertChildren.xhtml?rev=904323&view=auto
==============================================================================
--- myfaces/current20/test-webapp/webapp/src/main/webapp/resources/testComposite/compositeInsertChildren.xhtml (added)
+++ myfaces/current20/test-webapp/webapp/src/main/webapp/resources/testComposite/compositeInsertChildren.xhtml Fri Jan 29 00:34:58 2010
@@ -0,0 +1,39 @@
+<!--
+ 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:testComposite="http://java.sun.com/jsf/composite/testComposite">
+<head>
+</head>
+<body>
+<composite:interface>
+</composite:interface>
+<composite:implementation>
+ <testComposite:simpleInsertChildren>
+ <f:subview id="sv">
+ <h:panelGrid>
+ Mr.
+ <composite:insertChildren />
+ Smith
+ </h:panelGrid>
+ </f:subview>
+ </testComposite:simpleInsertChildren>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file
Added: myfaces/current20/test-webapp/webapp/src/main/webapp/resources/testComposite/simpleInsertChildren.xhtml
URL: http://svn.apache.org/viewvc/myfaces/current20/test-webapp/webapp/src/main/webapp/resources/testComposite/simpleInsertChildren.xhtml?rev=904323&view=auto
==============================================================================
--- myfaces/current20/test-webapp/webapp/src/main/webapp/resources/testComposite/simpleInsertChildren.xhtml (added)
+++ myfaces/current20/test-webapp/webapp/src/main/webapp/resources/testComposite/simpleInsertChildren.xhtml Fri Jan 29 00:34:58 2010
@@ -0,0 +1,35 @@
+<!--
+ 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 value="#{cc.childCount}"/>
+ <h:outputText value=" Hello " />
+ <p>
+ <composite:insertChildren/>
+ </p>
+ <h:outputText value=" Bye " />
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file
Added: myfaces/current20/test-webapp/webapp/src/main/webapp/resources/testComposite/simpleInsertFacet.xhtml
URL: http://svn.apache.org/viewvc/myfaces/current20/test-webapp/webapp/src/main/webapp/resources/testComposite/simpleInsertFacet.xhtml?rev=904323&view=auto
==============================================================================
--- myfaces/current20/test-webapp/webapp/src/main/webapp/resources/testComposite/simpleInsertFacet.xhtml (added)
+++ myfaces/current20/test-webapp/webapp/src/main/webapp/resources/testComposite/simpleInsertFacet.xhtml Fri Jan 29 00:34:58 2010
@@ -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">
+<head>
+</head>
+<body>
+<composite:interface>
+ <composite:facet name="header"/>
+</composite:interface>
+<composite:implementation>
+ <h:panelGrid>
+ <composite:insertFacet name="header"/>
+ </h:panelGrid>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file