Will this allow different .jar files to declare components in the same
namespace?
Thanks,
Ted.
On 2011-05-13, at 9:37 AM, Ed Burns wrote:
> Allow cc and non-cc components in one taglib http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1001
>
>
> SECTION: API Changes
> ----------------------------
> A jsf-api/doc/web-facelettaglibrary_2_2.xsd
>
> - First change to the facelet taglib schema in 2.2: introduce the
> ability to declare a resource which will be the composite component
> for a tag. Now, before you get all excited about what conventions we
> can use to make this easier, let me stop you right there. Here is a
> summary of the ease of use story regarding taglib files:
>
> The 80/20 rule says we should make taglib files optional most of the
> time. Here are the 80% cases.
>
> * The uses employs the cc naming convention
> http://java.sun.com/jsf/composite/<libraryName>
>
> * The user employs a java component has a @FacesComponent on it that
> declares the necessary metadata. JAVASERVERFACES_SPEC_PUBLIC-594
>
> Here are some of the cases where you must have a taglib file, the 20%
> cases.
>
> * If you want to employ a cc with a namespace other than
> http://java.sun.com/jsf/composite/<libraryName> you need to have a
> taglib file that declares <composite-library-name>. Currently you
> must not detlare any <tag> elements in such a taglib file. All the
> tags in such a library must come from the same resource library.
>
> * If the user is not employs a java component but is not using
> @FacesComponent.
>
> This changebundle makes it possible to add composite components to a
> non-composite taglib. I want the eventual fix for 594 to enable the
> reverse: make it possible to add non-composite components to a
> composite taglib (either with the naming convention or explicitly
> named).
>
> This patch introduces the following syntax.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibary_2_2.xsd"
> version="2.2">
>
> <namespace>test</namespace>
> <tag>
> <tag-name>layout</tag-name>
> <resource-id>myCC/whatever.xhtml</resource-id>
> </tag>
> </facelet-taglib>
>
> Where <resource-id> is a valid resource identifier as specified in
> section 2.6.1.3. Note that we need to tweak 2.6.1.3 as a result of
> work on JAVASERVERFACES_SPEC_PUBLIC-947.
>
> This design is in keeping with this existing text in the facelet
> taglib schema since 2.0:
>
> If the tag library XML file contains individual tag declarations
> rather than pointing to a library-class or a declaring a
> composite-library name, the individual tags are enclosed in tag
> elements.
>
> M jsf-api/src/main/java/javax/faces/application/package.html
>
> - First change to this package in 2.2
>
> M jsf-api/src/main/java/javax/faces/application/ResourceHandler.java
>
> - add method Resource createResourceFromId(String id)
>
> This is necessary to turn the contents of <resource-id> into a Resource.
>
> SECTION: Mojarra changes
>
> M jsf-ri/src/main/java/com/sun/faces/facelets/tag/jsf/CompositeComponentTagHandler.java
>
> - Make this tag handler public so I can use it in Mojarra where I need it.
>
> M jsf-ri/src/main/java/com/sun/faces/facelets/tag/TagLibraryImpl.java
>
> -
> M jsf-ri/src/main/java/com/sun/faces/facelets/tag/AbstractTagLibrary.java
> M jsf-ri/src/main/java/com/sun/faces/application/resource/ResourceManager.java
> M jsf-ri/src/main/java/com/sun/faces/application/resource/ResourceHandlerImpl.java
> M jsf-ri/src/main/java/com/sun/faces/config/processor/FaceletTaglibConfigProcessor.java
> M jsf-ri/src/main/java/com/sun/faces/config/ConfigManager.java
> M jsf-ri/src/main/java/com/sun/faces/config/DbfFactory.java
>
>
> A jsf-test/JAVASERVERFACES-2033
> A jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war
> A jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src
> A jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main
> A jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/java
> A jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/java/com
> A jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/java/com/sun
> A jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/java/com/sun/faceression
> A jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/java/com/sun/faceression/i_jsf_2033
> A jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/java/com/sun/faceression/i_jsf_2033/UserBean.java
> A jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp
> A jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/main.xhtml
> A jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/index.xhtml
> A jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/WEB-INF
> A jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/WEB-INF/test.taglib.xml
> A jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/WEB-INF/faces-config.xml
> A jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/WEB-INF/web.xml
> A jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/resources
> A jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/resources/myCC
> A jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/resources/myCC/layout.xhtml
> A jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/pom.xml
> A jsf-test/JAVASERVERFACES-2033/build.xml
>
>
> SECTION: Diffs
> ----------------------------
> Index: jsf-api/doc/web-facelettaglibrary_2_2.xsd
> ===================================================================
> --- jsf-api/doc/web-facelettaglibrary_2_2.xsd (revision 0)
> +++ jsf-api/doc/web-facelettaglibrary_2_2.xsd (revision 0)
> @@ -0,0 +1,554 @@
> +<?xml version = "1.0" encoding = "UTF-8"?>
> +<!--
> +
> + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
> +
> + Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
> +
> + The contents of this file are subject to the terms of either the GNU
> + General Public License Version 2 only ("GPL") or the Common Development
> + and Distribution License("CDDL") (collectively, the "License"). You
> + may not use this file except in compliance with the License. You can
> + obtain a copy of the License at
> + https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
> + or packager/legal/LICENSE.txt. See the License for the specific
> + language governing permissions and limitations under the License.
> +
> + When distributing the software, include this License Header Notice in each
> + file and include the License file at packager/legal/LICENSE.txt.
> +
> + GPL Classpath Exception:
> + Oracle designates this particular file as subject to the "Classpath"
> + exception as provided by Oracle in the GPL Version 2 section of the License
> + file that accompanied this code.
> +
> + Modifications:
> + If applicable, add the following below the License Header, with the fields
> + enclosed by brackets [] replaced by your own identifying information:
> + "Portions Copyright [year] [name of copyright owner]"
> +
> + Contributor(s):
> + If you wish your version of this file to be governed by only the CDDL or
> + only the GPL Version 2, indicate your decision by adding "[Contributor]
> + elects to include this software in this distribution under the [CDDL or GPL
> + Version 2] license." If you don't indicate a single choice of license, a
> + recipient has the option to distribute your version of this file under
> + either the CDDL, the GPL Version 2 or to extend the choice of license to
> + its licensees as provided above. However, if you add GPL Version 2 code
> + and therefore, elected the GPL Version 2 license, then the option applies
> + only if the new code is made subject to such option by the copyright
> + holder.
> +
> +-->
> +
> +<xsd:schema
> + targetNamespace="http://java.sun.com/xml/ns/javaee"
> + xmlns:javaee="http://java.sun.com/xml/ns/javaee"
> + xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> + xmlns:xml="http://www.w3.org/XML/1998/namespace"
> + elementFormDefault="qualified"
> + attributeFormDefault="unqualified"
> + version="2.0">
> + <xsd:include schemaLocation="javaee_5.xsd"/>
> +
> + <xsd:annotation>
> + <xsd:documentation>
> +
> + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
> +
> + Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
> +
> + The contents of this file are subject to the terms of either the GNU
> + General Public License Version 2 only ("GPL") or the Common Development
> + and Distribution License("CDDL") (collectively, the "License"). You
> + may not use this file except in compliance with the License. You can
> + obtain a copy of the License at
> + https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
> + or packager/legal/LICENSE.txt. See the License for the specific
> + language governing permissions and limitations under the License.
> +
> + When distributing the software, include this License Header Notice in each
> + file and include the License file at packager/legal/LICENSE.txt.
> +
> + GPL Classpath Exception:
> + Oracle designates this particular file as subject to the "Classpath"
> + exception as provided by Oracle in the GPL Version 2 section of the License
> + file that accompanied this code.
> +
> + Modifications:
> + If applicable, add the following below the License Header, with the fields
> + enclosed by brackets [] replaced by your own identifying information:
> + "Portions Copyright [year] [name of copyright owner]"
> +
> + Contributor(s):
> + If you wish your version of this file to be governed by only the CDDL or
> + only the GPL Version 2, indicate your decision by adding "[Contributor]
> + elects to include this software in this distribution under the [CDDL or GPL
> + Version 2] license." If you don't indicate a single choice of license, a
> + recipient has the option to distribute your version of this file under
> + either the CDDL, the GPL Version 2 or to extend the choice of license to
> + its licensees as provided above. However, if you add GPL Version 2 code
> + and therefore, elected the GPL Version 2 license, then the option applies
> + only if the new code is made subject to such option by the copyright
> + holder.
> +
> + </xsd:documentation>
> + </xsd:annotation>
> +
> +<xsd:annotation>
> + <xsd:documentation>
> +
> + <![CDATA[
> +
> + The XML Schema for the Tag Libraries in the JavaServer Faces
> + Standard Facelets View Declaration Language (Facelets VDL)
> + (Version 2.0).
> +
> + JSF 2.0 Facelet Tag Libraries that wish to conform to this
> + schema must declare it in the following manner.
> +
> + <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibary_2_0.xsd"
> + version="2.0">
> +
> + ...
> +
> + </facelet-taglib>
> +
> + The instance documents may indicate the published
> + version of the schema using xsi:schemaLocation attribute
> + for javaee namespace with the following location:
> +
> + http://java.sun.com/xml/ns/javaee/web-facelettaglibary_2_0.xsd
> +
> + ]]>
> +
> + </xsd:documentation>
> + </xsd:annotation>
> +
> +
> +
> + <xsd:element name="facelet-taglib" type="javaee:facelet-taglibType">
> + <xsd:unique name="facelet-taglib-tagname-uniqueness">
> + <xsd:annotation>
> + <xsd:documentation>
> +
> + tag-names must be unique within a document.
> + </xsd:documentation>
> + </xsd:annotation>
> + <xsd:selector xpath="javaee:tag"/>
> + <xsd:field xpath="javaee:tag-name"/>
> + </xsd:unique>
> + <xsd:unique name="faces-config-behavior-ID-uniqueness">
> + <xsd:annotation>
> + <xsd:documentation>
> +
> + Behavior IDs must be unique within a document.
> + </xsd:documentation>
> + </xsd:annotation>
> + <xsd:selector xpath="javaee:behavior"/>
> + <xsd:field xpath="javaee:behavior-id"/>
> + </xsd:unique>
> + <xsd:unique name="faces-config-converter-ID-uniqueness">
> + <xsd:annotation>
> + <xsd:documentation>
> +
> + Converter IDs must be unique within a document.
> + </xsd:documentation>
> + </xsd:annotation>
> + <xsd:selector xpath="javaee:converter"/>
> + <xsd:field xpath="javaee:converter-id"/>
> + </xsd:unique>
> + <xsd:unique name="faces-config-validator-ID-uniqueness">
> + <xsd:annotation>
> + <xsd:documentation>
> +
> + Validator IDs must be unique within a document.
> + </xsd:documentation>
> + </xsd:annotation>
> + <xsd:selector xpath="javaee:validator"/>
> + <xsd:field xpath="javaee:validator-id"/>
> + </xsd:unique>
> + </xsd:element>
> + <xsd:complexType name="facelet-taglibType">
> + <xsd:annotation>
> + <xsd:documentation>
> + The top level XML element in a facelet tag library XML file.
> + </xsd:documentation>
> + </xsd:annotation>
> + <xsd:sequence>
> + <xsd:group ref="javaee:descriptionGroup"/>
> + <xsd:choice>
> + <xsd:element name="library-class"
> + type="javaee:fully-qualified-classType"/>
> + <xsd:sequence>
> + <xsd:element name="namespace" type="javaee:string"/>
> + <xsd:element minOccurs="0" maxOccurs="1"
> + name="composite-library-name"
> + type="javaee:string"/>
> + <xsd:choice minOccurs="0" maxOccurs="unbounded">
> + <xsd:element name="tag"
> + type="javaee:facelet-taglib-tagType"/>
> + <xsd:element name="function"
> + type="javaee:facelet-taglib-functionType"/>
> +
> + </xsd:choice>
> + </xsd:sequence>
> + </xsd:choice>
> + <xsd:element name="taglib-extension"
> + type="javaee:facelet-taglib-extensionType"
> + minOccurs="0"
> + maxOccurs="unbounded"/>
> + </xsd:sequence>
> + <xsd:attribute name="id" type="xsd:ID"/>
> + <xsd:attribute name="version"
> + type="javaee:facelet-taglib-versionType"
> + use="required"/>
> + </xsd:complexType>
> + <xsd:complexType name="facelet-taglib-extensionType">
> + <xsd:annotation>
> + <xsd:documentation>
> + Extension element for facelet-taglib. It may contain
> + implementation specific content.
> + </xsd:documentation>
> + </xsd:annotation>
> +
> + <xsd:sequence>
> + <xsd:any namespace="##any"
> + processContents="lax"
> + minOccurs="0"
> + maxOccurs="unbounded"/>
> + </xsd:sequence>
> + <xsd:attribute name="id" type="xsd:ID"/>
> + </xsd:complexType>
> +
> + <xsd:complexType name="facelet-taglib-tagType">
> + <xsd:annotation>
> + <xsd:documentation>
> + If the tag library XML file contains individual tag
> + declarations rather than pointing to a library-class or a
> + declaring a composite-library name, the individual tags are
> + enclosed in tag elements.
> + </xsd:documentation>
> + </xsd:annotation>
> + <xsd:sequence>
> + <xsd:group ref="javaee:descriptionGroup"/>
> + <xsd:element name="tag-name"
> + type="javaee:facelet-taglib-canonical-nameType"/>
> + <xsd:choice>
> + <xsd:element name="handler-class"
> + type="javaee:fully-qualified-classType"/>
> + <xsd:element name="behavior"
> + type="javaee:facelet-taglib-tag-behaviorType"/>
> + <xsd:element name="component"
> + type="javaee:facelet-taglib-tag-componentType"/>
> + <xsd:element name="converter"
> + type="javaee:facelet-taglib-tag-converterType"/>
> + <xsd:element name="validator"
> + type="javaee:facelet-taglib-tag-validatorType"/>
> + <xsd:element name="source" type="javaee:string"/>
> + <xsd:element name="resource-id" type="javaee:string"/>
> + </xsd:choice>
> + <xsd:element name="attribute"
> + type="javaee:facelet-taglib-tag-attributeType"
> + minOccurs="0"
> + maxOccurs="unbounded"/>
> + <xsd:element name="tag-extension"
> + type="javaee:facelet-taglib-tag-extensionType"
> + minOccurs="0"
> + maxOccurs="unbounded"/>
> + </xsd:sequence>
> + </xsd:complexType>
> +
> + <!-- **************************************************** -->
> +
> + <xsd:complexType name="facelet-taglib-tag-attributeType">
> + <xsd:annotation>
> + <xsd:documentation>
> +
> + The attribute element defines an attribute for the nesting
> + tag. The attribute element may have several subelements
> + defining:
> +
> + description a description of the attribute
> +
> + name the name of the attribute
> +
> + required whether the attribute is required or
> + optional
> +
> + type the type of the attribute
> +
> + </xsd:documentation>
> + </xsd:annotation>
> +
> + <xsd:sequence>
> + <xsd:group ref="javaee:descriptionGroup"/>
> + <xsd:element name="name"
> + type="javaee:xsdNMTOKENType"/>
> + <xsd:element name="required"
> + type="javaee:generic-booleanType"
> + minOccurs="0">
> + <xsd:annotation>
> + <xsd:documentation>
> +
> + Defines if the nesting attribute is required or
> + optional.
> +
> + If not present then the default is "false", i.e
> + the attribute is optional.
> +
> + </xsd:documentation>
> + </xsd:annotation>
> + </xsd:element>
> + <xsd:choice>
> + <xsd:element name="type"
> + type="javaee:fully-qualified-classType"
> + minOccurs="0">
> + <xsd:annotation>
> + <xsd:documentation>
> +
> + Defines the Java type of the attributes
> + value. If this element is omitted, the
> + expected type is assumed to be
> + "java.lang.Object".
> +
> + </xsd:documentation>
> + </xsd:annotation>
> + </xsd:element>
> + <xsd:element name="method-signature"
> + type="javaee:string"
> + minOccurs="0">
> + <xsd:annotation>
> + <xsd:documentation>
> +
> + Defines the method signature for a MethodExpression-
> + enabled attribute.
> +
> + </xsd:documentation>
> + </xsd:annotation>
> + </xsd:element>
> + </xsd:choice>
> + </xsd:sequence>
> + <xsd:attribute name="id" type="xsd:ID"/>
> + </xsd:complexType>
> +
> +
> + <xsd:complexType name="facelet-taglib-tag-extensionType">
> + <xsd:annotation>
> + <xsd:documentation>
> + Extension element for tag It may contain
> + implementation specific content.
> + </xsd:documentation>
> + </xsd:annotation>
> +
> + <xsd:sequence>
> + <xsd:any namespace="##any"
> + processContents="lax"
> + minOccurs="0"
> + maxOccurs="unbounded"/>
> + </xsd:sequence>
> + <xsd:attribute name="id" type="xsd:ID"/>
> + </xsd:complexType>
> +
> + <xsd:complexType name="facelet-taglib-functionType">
> + <xsd:annotation>
> + <xsd:documentation>
> + If the tag library XML file contains individual function
> + declarations rather than pointing to a library-class or a
> + declaring a composite-library name, the individual functions are
> + enclosed in function elements.
> + </xsd:documentation>
> + </xsd:annotation>
> + <xsd:sequence>
> + <xsd:group ref="javaee:descriptionGroup"/>
> + <xsd:element name="function-name" type="javaee:string"/>
> + <xsd:element name="function-class"
> + type="javaee:fully-qualified-classType"/>
> + <xsd:element name="function-signature" type="javaee:string"/>
> + </xsd:sequence>
> + </xsd:complexType>
> + <xsd:complexType name="facelet-taglib-tag-behaviorType">
> + <xsd:annotation>
> + <xsd:documentation>
> + Within a tag element, the behavior element encapsulates
> + information specific to a JSF Behavior.
> + </xsd:documentation>
> + </xsd:annotation>
> + <xsd:sequence>
> + <xsd:group ref="javaee:descriptionGroup"/>
> + <xsd:element minOccurs="1" maxOccurs="1"
> + name="behavior-id" type="javaee:string"/>
> + <xsd:element minOccurs="0" maxOccurs="1"
> + name="handler-class"
> + type="javaee:fully-qualified-classType"/>
> + <xsd:element name="behavior-extension"
> + type="javaee:facelet-taglib-tag-behavior-extensionType"
> + minOccurs="0"
> + maxOccurs="unbounded"/>
> + </xsd:sequence>
> + </xsd:complexType>
> + <xsd:complexType name="facelet-taglib-tag-behavior-extensionType">
> + <xsd:annotation>
> + <xsd:documentation>
> + Extension element for behavior. It may contain
> + implementation specific content.
> + </xsd:documentation>
> + </xsd:annotation>
> +
> + <xsd:sequence>
> + <xsd:any namespace="##any"
> + processContents="lax"
> + minOccurs="0"
> + maxOccurs="unbounded"/>
> + </xsd:sequence>
> + <xsd:attribute name="id" type="xsd:ID"/>
> + </xsd:complexType>
> + <xsd:complexType name="facelet-taglib-tag-componentType">
> + <xsd:annotation>
> + <xsd:documentation>
> + Within a tag element, the component element encapsulates
> + information specific to a JSF UIComponent.
> + </xsd:documentation>
> + </xsd:annotation>
> + <xsd:sequence>
> + <xsd:group ref="javaee:descriptionGroup"/>
> + <xsd:element name="component-type" type="javaee:string"/>
> + <xsd:element minOccurs="0" maxOccurs="1"
> + name="renderer-type" type="javaee:string"/>
> + <xsd:element minOccurs="0" maxOccurs="1"
> + name="handler-class"
> + type="javaee:fully-qualified-classType"/>
> + <xsd:element name="component-extension"
> + type="javaee:facelet-taglib-tag-component-extensionType"
> + minOccurs="0"
> + maxOccurs="unbounded"/>
> +
> + </xsd:sequence>
> + </xsd:complexType>
> + <xsd:complexType name="facelet-taglib-tag-component-extensionType">
> + <xsd:annotation>
> + <xsd:documentation>
> + Extension element for component It may contain
> + implementation specific content.
> + </xsd:documentation>
> + </xsd:annotation>
> +
> + <xsd:sequence>
> + <xsd:any namespace="##any"
> + processContents="lax"
> + minOccurs="0"
> + maxOccurs="unbounded"/>
> + </xsd:sequence>
> + <xsd:attribute name="id" type="xsd:ID"/>
> + </xsd:complexType>
> +
> + <xsd:complexType name="facelet-taglib-tag-converterType">
> + <xsd:annotation>
> + <xsd:documentation>
> + Within a tag element, the converter element encapsulates
> + information specific to a JSF Converter.
> + </xsd:documentation>
> + </xsd:annotation>
> + <xsd:sequence>
> + <xsd:group ref="javaee:descriptionGroup"/>
> + <xsd:element minOccurs="1" maxOccurs="1"
> + name="converter-id" type="javaee:string"/>
> + <xsd:element minOccurs="0" maxOccurs="1"
> + name="handler-class"
> + type="javaee:fully-qualified-classType"/>
> + <xsd:element name="converter-extension"
> + type="javaee:facelet-taglib-tag-converter-extensionType"
> + minOccurs="0"
> + maxOccurs="unbounded"/>
> + </xsd:sequence>
> + </xsd:complexType>
> + <xsd:complexType name="facelet-taglib-tag-converter-extensionType">
> + <xsd:annotation>
> + <xsd:documentation>
> + Extension element for converter It may contain
> + implementation specific content.
> + </xsd:documentation>
> + </xsd:annotation>
> +
> + <xsd:sequence>
> + <xsd:any namespace="##any"
> + processContents="lax"
> + minOccurs="0"
> + maxOccurs="unbounded"/>
> + </xsd:sequence>
> + <xsd:attribute name="id" type="xsd:ID"/>
> + </xsd:complexType>
> +
> + <xsd:complexType name="facelet-taglib-tag-validatorType">
> + <xsd:annotation>
> + <xsd:documentation>
> + Within a tag element, the validator element encapsulates
> + information specific to a JSF Validator.
> + </xsd:documentation>
> + </xsd:annotation>
> + <xsd:sequence>
> + <xsd:group ref="javaee:descriptionGroup"/>
> + <xsd:element minOccurs="1" maxOccurs="1"
> + name="validator-id" type="javaee:string"/>
> + <xsd:element minOccurs="0" maxOccurs="1"
> + name="handler-class"
> + type="javaee:fully-qualified-classType"/>
> + <xsd:element name="validator-extension"
> + type="javaee:facelet-taglib-tag-validator-extensionType"
> + minOccurs="0"
> + maxOccurs="unbounded"/>
> + </xsd:sequence>
> + </xsd:complexType>
> + <xsd:complexType name="facelet-taglib-tag-validator-extensionType">
> + <xsd:annotation>
> + <xsd:documentation>
> + Extension element for validator It may contain
> + implementation specific content.
> + </xsd:documentation>
> + </xsd:annotation>
> +
> + <xsd:sequence>
> + <xsd:any namespace="##any"
> + processContents="lax"
> + minOccurs="0"
> + maxOccurs="unbounded"/>
> + </xsd:sequence>
> + <xsd:attribute name="id" type="xsd:ID"/>
> + </xsd:complexType>
> +
> + <!-- **************************************************** -->
> + <xsd:simpleType name="facelet-taglib-versionType">
> + <xsd:annotation>
> + <xsd:documentation>
> + This type contains the recognized versions of
> + facelet-taglib supported.
> + </xsd:documentation>
> + </xsd:annotation>
> + <xsd:restriction base="xsd:token">
> + <xsd:enumeration value="2.0"/>
> + </xsd:restriction>
> + </xsd:simpleType>
> +
> + <xsd:complexType name="facelet-taglib-canonical-nameType">
> +
> + <xsd:annotation>
> + <xsd:documentation>
> +
> + Defines the canonical name of a tag or attribute being
> + defined.
> +
> + The name must conform to the lexical rules for an NCName
> +
> + </xsd:documentation>
> + </xsd:annotation>
> +
> + <xsd:simpleContent>
> + <xsd:extension base="xsd:NCName">
> + <xsd:attribute name="id" type="xsd:ID"/>
> + </xsd:extension>
> + </xsd:simpleContent>
> + </xsd:complexType>
> +
> +</xsd:schema>
> Index: jsf-api/src/main/java/javax/faces/application/package.html
> ===================================================================
> --- jsf-api/src/main/java/javax/faces/application/package.html (revision 9035)
> +++ jsf-api/src/main/java/javax/faces/application/package.html (working copy)
> @@ -47,7 +47,7 @@
> <body bgcolor="white">
>
> <p><span class="changed_modified_2_0 changed_modified_2_0_rev_a
> -changed_modified_2_1">APIs</span> that are used to link an application's
> +changed_modified_2_1 changed_modified_2_2">APIs</span> that are used to link an application's
> business logic objects to JavaServer Faces, as well as convenient
> pluggable mechanisms to manage the execution of an application that is
> based on JavaServer Faces. The main class in this package is {_at_link
> Index: jsf-api/src/main/java/javax/faces/application/ResourceHandler.java
> ===================================================================
> --- jsf-api/src/main/java/javax/faces/application/ResourceHandler.java (revision 9035)
> +++ jsf-api/src/main/java/javax/faces/application/ResourceHandler.java (working copy)
> @@ -207,7 +207,38 @@
> */
> public abstract Resource createResource(String resourceName);
>
> + /**
> + * <p class="changed_added_2_2">Create an instance of
> + * <code>Resource</code> given the argument
> + * <code>resourceId</code>. The content-type of the resource is
> + * derived by passing the <em>resourceName</em> to {_at_link
> + * javax.faces.context.ExternalContext#getMimeType}</p>
>
> + * <div class="changed_added_2_2">
> +
> + * <p>The resource must be identified according to the specification in
> + * JSF.2.6.1.3 of the spec prose
> + * document <a
> + * href="../../../overview-summary.html#prose_document">linked in
> + * the overview summary</a>.</p>
> +
> + * </div>
> +
> + * @param resourceId the resource identifier of the resource.
> + *
> + * @throws NullPointerException if <code>resourceId</code> is
> + * <code>null</code>.
> + *
> + * @return a newly created <code>Resource</code> instance, suitable
> + * for use in encoding or decoding the named resource.
> + *
> + * @since 2.2
> + */
> +
> + public Resource createResourceFromId(String resourceId) {
> + return null;
> + }
> +
> /**
> * <p class="changed_added_2_0">Create an instance of
> * <code>Resource</code> with a resourceName given by the value of
> Index: jsf-ri/src/main/java/com/sun/faces/facelets/tag/jsf/CompositeComponentTagHandler.java
> ===================================================================
> --- jsf-ri/src/main/java/com/sun/faces/facelets/tag/jsf/CompositeComponentTagHandler.java (revision 9035)
> +++ jsf-ri/src/main/java/com/sun/faces/facelets/tag/jsf/CompositeComponentTagHandler.java (working copy)
> @@ -129,7 +129,7 @@
> // ------------------------------------------------------------ Constructors
>
>
> - CompositeComponentTagHandler(Resource ccResource, ComponentConfig config) {
> + public CompositeComponentTagHandler(Resource ccResource, ComponentConfig config) {
> super(config);
> this.ccResource = ccResource;
> this.binding = config.getTag().getAttributes().get("binding");
> Index: jsf-ri/src/main/java/com/sun/faces/facelets/tag/TagLibraryImpl.java
> ===================================================================
> --- jsf-ri/src/main/java/com/sun/faces/facelets/tag/TagLibraryImpl.java (revision 9035)
> +++ jsf-ri/src/main/java/com/sun/faces/facelets/tag/TagLibraryImpl.java (working copy)
> @@ -122,6 +122,12 @@
> this.addUserTag(name, source);
> }
>
> + public void putCompositeComponentTag(String name, String resourceId) {
> + Util.notNull("name", name);
> + Util.notNull("resourceId", resourceId);
> + this.addCompositeComponentTag(name, resourceId);
> + }
> +
> public void putFunction(String name, Method method) {
> Util.notNull("name", name);
> Util.notNull("method", method);
> Index: jsf-ri/src/main/java/com/sun/faces/facelets/tag/AbstractTagLibrary.java
> ===================================================================
> --- jsf-ri/src/main/java/com/sun/faces/facelets/tag/AbstractTagLibrary.java (revision 9035)
> +++ jsf-ri/src/main/java/com/sun/faces/facelets/tag/AbstractTagLibrary.java (working copy)
> @@ -58,6 +58,7 @@
>
> package com.sun.faces.facelets.tag;
>
> +import com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler;
> import javax.el.ELException;
> import javax.faces.FacesException;
> import javax.faces.view.facelets.*;
> @@ -67,6 +68,10 @@
> import java.net.URL;
> import java.util.HashMap;
> import java.util.Map;
> +import javax.faces.application.Resource;
> +import javax.faces.application.ResourceHandler;
> +import javax.faces.context.FacesContext;
> +import javax.faces.view.Location;
>
> /**
> * Base class for defining TagLibraries in Java
> @@ -252,6 +257,36 @@
> }
> }
>
> + private static class CompositeComponentTagFactory implements TagHandlerFactory {
> + protected final String resourceId;
> +
> + public CompositeComponentTagFactory(String resourceId) {
> + this.resourceId = resourceId;
> + }
> +
> + public TagHandler createHandler(TagConfig cfg) throws FacesException,
> + ELException {
> + ComponentConfig componentConfig =
> + new ComponentConfigWrapper(cfg,
> + "javax.faces.NamingContainer",
> + "javax.faces.Composite");
> + ResourceHandler resourceHandler =
> + FacesContext.getCurrentInstance().getApplication().getResourceHandler();
> + TagHandler result = null;
> + // Use the naming convention to extract the library name and
> + // component name from the resourceId.
> + Resource resource = resourceHandler.createResourceFromId(resourceId);
> + if (null != resource) {
> + result = new CompositeComponentTagHandler(resource, componentConfig);
> + } else {
> + Location loc = new Location(resourceId, 0, 0);
> + Tag tag = new Tag(loc, "", "", "", null);
> + throw new TagException(tag, "Cannot create composite component tag handler for composite-source element in taglib.xml file");
> + }
> + return result;
> + }
> + }
> +
> private static class ComponentHandlerFactory implements TagHandlerFactory {
>
> protected final String componentType;
> @@ -626,7 +661,19 @@
> this.factories.put(name, new UserTagFactory(source));
> }
>
> + /**
> + * Add a CompositeComponentTagHandler for the specified resource.
> + *
> + * @see UserTagHandler
> + * @param name
> + * name to use, "foo" would be <my:foo />
> + * @param resourecId source where the Facelet (Tag) source is
> + */
> + protected final void addCompositeComponentTag(String name, String resourceId) {
> + this.factories.put(name, new CompositeComponentTagFactory(resourceId));
> + }
>
> +
> /**
> * Add a Method to be used as a Function at Compilation.
> *
> Index: jsf-ri/src/main/java/com/sun/faces/application/resource/ResourceManager.java
> ===================================================================
> --- jsf-ri/src/main/java/com/sun/faces/application/resource/ResourceManager.java (revision 9035)
> +++ jsf-ri/src/main/java/com/sun/faces/application/resource/ResourceManager.java (working copy)
> @@ -438,6 +438,25 @@
> }
>
> }
> +
> + ResourceInfo findResource(String resourceId) {
> + String libraryName = null;
> + String resourceName = null;
> + int end = 0, start = 0;
> + if (-1 != (end = resourceId.lastIndexOf("/"))) {
> + resourceName = resourceId.substring(end+1);
> + if (-1 != (start = resourceId.lastIndexOf("/", end - 1))) {
> + libraryName = resourceId.substring(start+1, end);
> + } else {
> + libraryName = resourceId.substring(0, end);
> + }
> + }
> + FacesContext context = FacesContext.getCurrentInstance();
> + LibraryInfo info = this.findLibrary(libraryName, null, context);
> + ResourceInfo resourceInfo = this.findResource(info, resourceName, libraryName, true, context);
> +
> + return resourceInfo;
> + }
>
>
> /**
> Index: jsf-ri/src/main/java/com/sun/faces/application/resource/ResourceHandlerImpl.java
> ===================================================================
> --- jsf-ri/src/main/java/com/sun/faces/application/resource/ResourceHandlerImpl.java (revision 9035)
> +++ jsf-ri/src/main/java/com/sun/faces/application/resource/ResourceHandlerImpl.java (working copy)
> @@ -112,7 +112,36 @@
>
> }
>
> + /**
> + * @see ResourceHandler#createResourceFromId(String)
> + */
> + @Override
> + public Resource createResourceFromId(String resourceId) {
> + Util.notNull("resourceId", resourceId);
> + FacesContext ctx = FacesContext.getCurrentInstance();
>
> + boolean development = ctx.isProjectStage(ProjectStage.Development);
> +
> + ResourceInfo info = manager.findResource(resourceId);
> + String ctype = getContentType(ctx, resourceId);
> + if (info == null) {
> + // prevent message from being when we're dealing with
> + // groovy is present and Application.createComponent()
> + // tries to resolve a .groovy file as backing UIComponent.
> + if (!development && "application/x-groovy".equals(ctype)) {
> + return null;
> + }
> + logMissingResource(ctx, resourceId, null);
> + return null;
> + } else {
> + return new ResourceImpl(info, ctype, creationTime, maxAge);
> + }
> +
> + }
> +
> +
> +
> +
> /**
> * @see ResourceHandler#createResource(String, String)
> */
> @@ -434,7 +463,39 @@
>
> }
>
> + /**
> + * Log a message indicating a particular resource (reference by name and/or
> + * library) could not be found. If this was due to an exception, the exception
> + * provided will be logged as well.
> + *
> + * @param ctx the {_at_link FacesContext} for the current request
> + * @param resourceName the resource name
> + * @param libraryName the resource library
> + * @param t the exception caught when attempting to find the resource
> + */
> + private void logMissingResource(FacesContext ctx,
> + String resourceId,
> + Throwable t) {
>
> + Level level;
> + if (!ctx.isProjectStage(ProjectStage.Production)) {
> + level = Level.WARNING;
> + } else {
> + level = ((t != null) ? Level.WARNING : Level.FINE);
> + }
> +
> + if (LOGGER.isLoggable(level)) {
> + LOGGER.log(level,
> + "jsf.application.resource.unable_to_serve",
> + new Object[]{resourceId});
> + if (t != null) {
> + LOGGER.log(level, "", t);
> + }
> + }
> +
> + }
> +
> +
> /**
> * @param resourceName the resource of interest. The resourceName in question
> * may consist of zero or more path elements such that resourceName could
> Index: jsf-ri/src/main/java/com/sun/faces/config/processor/FaceletTaglibConfigProcessor.java
> ===================================================================
> --- jsf-ri/src/main/java/com/sun/faces/config/processor/FaceletTaglibConfigProcessor.java (revision 9035)
> +++ jsf-ri/src/main/java/com/sun/faces/config/processor/FaceletTaglibConfigProcessor.java (working copy)
> @@ -25,7 +25,7 @@
> * enclosed by brackets [] replaced by your own identifying information:
> * "Portions Copyright [year] [name of copyright owner]"
> *
> - * Contributor(s):
> + * Contributor(resourceId):
> * If you wish your version of this file to be governed by only the CDDL or
> * only the GPL Version 2, indicate your decision by adding "[Contributor]
> * elects to include this software in this distribution under the [CDDL or GPL
> @@ -147,6 +147,13 @@
>
> /**
> * <p>
> + * /facelet-taglib/tag/resource-id
> + * </p>
> + */
> + private static final String RESOURCE_ID = "resource-id";
> +
> + /**
> + * <p>
> * <ul>
> * <li>/facelet-taglib/tag/tag-handler</li>
> * <li>/facelet-taglib/tag/converter/handler-class</li>
> @@ -336,6 +343,7 @@
> NodeList validator = null;
> NodeList behavior = null;
> Node source = null;
> + Node resourceId = null;
> Node handlerClass = null;
> for (int j = 0, jlen = children.getLength(); j < jlen; j++) {
> Node n = children.item(j);
> @@ -353,6 +361,8 @@
> behavior = n.getChildNodes();
> } else if (SOURCE.equals(n.getLocalName())) {
> source = n;
> + } else if (RESOURCE_ID.equals(n.getLocalName())) {
> + resourceId = n;
> } else if (HANDLER_CLASS.equals(n.getLocalName())) {
> handlerClass = n;
> }
> @@ -367,6 +377,8 @@
> processBehavior(behavior, taglibrary, tagName);
> } else if (source != null) {
> processSource(documentElement, source, taglibrary, tagName);
> + } else if (resourceId != null) {
> + processResourceId(documentElement, resourceId, taglibrary, tagName);
> } else if (handlerClass != null) {
> processHandlerClass(handlerClass, taglibrary, tagName);
> }
> @@ -455,7 +467,16 @@
>
> }
>
> + private void processResourceId(Element documentElement,
> + Node compositeSource,
> + TagLibraryImpl taglibrary,
> + String name) {
>
> + String resourceId = getNodeText(compositeSource);
> + taglibrary.putCompositeComponentTag(name, resourceId);
> +
> + }
> +
> private void processValidator(NodeList validator,
> TagLibraryImpl taglibrary,
> String name) {
> Index: jsf-ri/src/main/java/com/sun/faces/config/ConfigManager.java
> ===================================================================
> --- jsf-ri/src/main/java/com/sun/faces/config/ConfigManager.java (revision 9035)
> +++ jsf-ri/src/main/java/com/sun/faces/config/ConfigManager.java (working copy)
> @@ -994,6 +994,12 @@
> } else {
> schema = DbfFactory.FacesSchema.FACES_21;
> }
> + } else if ("2.2".equals(versionStr)) {
> + if ("facelet-taglib".equals(documentElement.getLocalName())) {
> + schema = DbfFactory.FacesSchema.FACELET_TAGLIB_22;
> + } else {
> + schema = DbfFactory.FacesSchema.FACES_21;
> + }
> } else if ("1.2".equals(versionStr)) {
> schema = DbfFactory.FacesSchema.FACES_12;
> } else {
> Index: jsf-ri/src/main/java/com/sun/faces/config/DbfFactory.java
> ===================================================================
> --- jsf-ri/src/main/java/com/sun/faces/config/DbfFactory.java (revision 9035)
> +++ jsf-ri/src/main/java/com/sun/faces/config/DbfFactory.java (working copy)
> @@ -126,6 +126,12 @@
> AS_SCHEMA_DIR + "web-facelettaglibrary_2_0.xsd";
>
> /**
> + * Location of the facelet taglib xsd within GlassFish.
> + */
> + private static final String FACELET_TAGLIB_2_2_XSD_FILE =
> + AS_SCHEMA_DIR + "web-facelettaglibrary_2_2.xsd";
> +
> + /**
> * Location of the faces 2.0 xsd within GlassFish.
> */
> private static final String FACES_2_0_XSD_FILE =
> @@ -150,6 +156,11 @@
> private static Schema FACELET_TAGLIB_20_SCHEMA;
>
> /**
> + * Our cached 2.2 facelet-taglib Schema object for validation
> + */
> + private static Schema FACELET_TAGLIB_22_SCHEMA;
> +
> + /**
> * Our cached 2.0 Schema object for validation
> */
> private static Schema FACES_20_SCHEMA;
> @@ -182,7 +193,8 @@
> FACES_21(FACES_21_SCHEMA),
> FACES_12(FACES_12_SCHEMA),
> FACES_11(FACES_11_SCHEMA),
> - FACELET_TAGLIB_20(FACELET_TAGLIB_20_SCHEMA);
> + FACELET_TAGLIB_20(FACELET_TAGLIB_20_SCHEMA),
> + FACELET_TAGLIB_22(FACELET_TAGLIB_22_SCHEMA);
>
> private Schema schema;
>
> Index: jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/java/com/sun/faceression/i_jsf_2033/UserBean.java
> ===================================================================
> --- jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/java/com/sun/faceression/i_jsf_2033/UserBean.java (revision 0)
> +++ jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/java/com/sun/faceression/i_jsf_2033/UserBean.java (revision 0)
> @@ -0,0 +1,89 @@
> +package com.sun.faceression.i_jsf_2033;
> +
> +import java.util.Date;
> +import javax.faces.application.FacesMessage;
> +import javax.faces.component.UIComponent;
> +import javax.faces.context.FacesContext;
> +import javax.faces.bean.ManagedBean;
> +import javax.faces.bean.SessionScoped;
> +import javax.faces.validator.ValidatorException;
> +
> +_at_ManagedBean
> +_at_SessionScoped
> +public class UserBean {
> +
> + protected String firstName;
> + protected String lastName;
> + protected Date dob;
> + protected String sex;
> + protected String email;
> + protected String serviceLevel = "medium";
> +
> + public String getFirstName() {
> + return firstName;
> + }
> +
> + public void setFirstName(String firstName) {
> + this.firstName = firstName;
> + }
> +
> + public String getLastName() {
> + return lastName;
> + }
> +
> + public void setLastName(String lastName) {
> + this.lastName = lastName;
> + }
> +
> + public Date getDob() {
> + return dob;
> + }
> +
> + public void setDob(Date dob) {
> + this.dob = dob;
> + }
> +
> + public String getSex() {
> + return sex;
> + }
> +
> + public void setSex(String sex) {
> + this.sex = sex;
> + }
> +
> + public String getEmail() {
> + return email;
> + }
> +
> + public void setEmail(String email) {
> + this.email = email;
> + }
> +
> + public String getServiceLevel() {
> + return serviceLevel;
> + }
> +
> + public void setServiceLevel(String serviceLevel) {
> + this.serviceLevel = serviceLevel;
> + }
> +
> + public void validateEmail(FacesContext context, UIComponent toValidate,
> + Object value) throws ValidatorException {
> + String emailStr = (String) value;
> + if (-1 == emailStr.indexOf("@")) {
> + FacesMessage message = new FacesMessage("Invalid email address");
> + throw new ValidatorException(message);
> + }
> + }
> +
> + public String addConfirmedUser() {
> + // This method would call a database or other service and add the
> + // confirmed user information.
> + // For now, we just place an informative message in request scope
> + FacesMessage doneMessage =
> + new FacesMessage("Successfully added new user");
> + FacesContext.getCurrentInstance().addMessage(null, doneMessage);
> + return "done";
> + }
> +}
> +
> Index: jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/main.xhtml
> ===================================================================
> --- jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/main.xhtml (revision 0)
> +++ jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/main.xhtml (revision 0)
> @@ -0,0 +1,13 @@
> +<!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">
> +<h:head>
> + <title>A Simple JavaServer Faces 2.0 View</title>
> +</h:head>
> +<h:body>
> + <h:form>
> + <p><h:commandButton value="submit" /></p>
> + </h:form>
> +</h:body>
> +</html>
> Index: jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/index.xhtml
> ===================================================================
> --- jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/index.xhtml (revision 0)
> +++ jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/index.xhtml (revision 0)
> @@ -0,0 +1,16 @@
> +<!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:ui="http://java.sun.com/jsf/facelets"
> + xmlns:h="http://java.sun.com/jsf/html"
> + xmlns:f="http://java.sun.com/jsf/core"
> + xmlns:test="test">
> +
> +<h:head>
> +</h:head>
> +<h:body id="body">
> +
> + <test:layout id="myLayout" />
> +
> +</h:body>
> +</html>
> Index: jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/WEB-INF/test.taglib.xml
> ===================================================================
> --- jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/WEB-INF/test.taglib.xml (revision 0)
> +++ jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/WEB-INF/test.taglib.xml (revision 0)
> @@ -0,0 +1,15 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibary_2_2.xsd"
> + version="2.2">
> +
> + <namespace>test</namespace>
> + <!-- composite-library-name>myCC</composite-library-name -->
> +
> + <tag>
> + <tag-name>layout</tag-name>
> + <resource-id>myCC/layout.xhtml</resource-id>
> + </tag>
> +
> +</facelet-taglib>
> Index: jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/WEB-INF/faces-config.xml
> ===================================================================
> --- jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/WEB-INF/faces-config.xml (revision 0)
> +++ jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/WEB-INF/faces-config.xml (revision 0)
> @@ -0,0 +1,9 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +
> +<faces-config
> + xmlns="http://java.sun.com/xml/ns/javaee"
> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
> + version="2.0">
> +
> +</faces-config>
> Index: jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/WEB-INF/web.xml
> ===================================================================
> --- jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/WEB-INF/web.xml (revision 0)
> +++ jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/WEB-INF/web.xml (revision 0)
> @@ -0,0 +1,25 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
> + <welcome-file-list>
> + <welcome-file>index.xhtml</welcome-file>
> + </welcome-file-list>
> + <context-param>
> + <param-name>javax.faces.PROJECT_STAGE</param-name>
> + <param-value>Development</param-value>
> + </context-param>
> +
> + <context-param>
> + <param-name>javax.faces.FACELETS_LIBRARIES</param-name>
> + <param-value>/WEB-INF/test.taglib.xml</param-value>
> + </context-param>
> +
> + <servlet>
> + <servlet-name>Faces Servlet</servlet-name>
> + <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
> + <load-on-startup>1</load-on-startup>
> + </servlet>
> + <servlet-mapping>
> + <servlet-name>Faces Servlet</servlet-name>
> + <url-pattern>*.xhtml</url-pattern>
> + </servlet-mapping>
> +</web-app>
> \ No newline at end of file
> Index: jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/resources/myCC/layout.xhtml
> ===================================================================
> --- jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/resources/myCC/layout.xhtml (revision 0)
> +++ jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/src/main/webapp/resources/myCC/layout.xhtml (revision 0)
> @@ -0,0 +1,20 @@
> +<!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:ui="http://java.sun.com/jsf/facelets"
> + xmlns:cc="http://java.sun.com/jsf/composite">
> +<head>
> + <title></title>
> +</head>
> +
> +<body>
> +
> + <cc:interface>
> + </cc:interface>
> + <cc:implementation>
> + <div id="#{cc.clientId}">Test</div>
> + </cc:implementation>
> +</body>
> +
> +</html>
> Index: jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/pom.xml
> ===================================================================
> --- jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/pom.xml (revision 0)
> +++ jsf-test/JAVASERVERFACES-2033/i_jsf_2033_war/pom.xml (revision 0)
> @@ -0,0 +1,45 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
> + <modelVersion>4.0.0</modelVersion>
> +
> + <groupId>com.sun.faces.regression</groupId>
> + <artifactId>i_jsf_2033_war</artifactId>
> + <version>1.0</version>
> + <packaging>war</packaging>
> + <name>${project.artifactId}</name>
> + <build>
> + <finalName>${project.artifactId}</finalName>
> + <plugins>
> + <plugin>
> + <artifactId>maven-compiler-plugin</artifactId>
> + <configuration>
> + <source>1.6</source>
> + <target>1.6</target>
> + </configuration>
> + </plugin>
> + </plugins>
> + </build>
> + <dependencies>
> + <dependency>
> + <groupId>javax.faces</groupId>
> + <artifactId>jsf-api</artifactId>
> + <version>2.1</version>
> + <scope>provided</scope>
> + </dependency>
> + <dependency>
> + <groupId>javax</groupId>
> + <artifactId>javaee-api</artifactId>
> + <version>6.0</version>
> + <scope>provided</scope>
> + </dependency>
> + </dependencies>
> +
> + <repositories>
> + <repository>
> + <id>java.net-maven2-repository</id>
> + <name>Java.net Repository for Maven</name>
> + <url>http://download.java.net/maven/2/</url>
> + <layout>default</layout>
> + </repository>
> + </repositories>
> +</project>
> Index: jsf-test/JAVASERVERFACES-2033/build.xml
> ===================================================================
> --- jsf-test/JAVASERVERFACES-2033/build.xml (revision 0)
> +++ jsf-test/JAVASERVERFACES-2033/build.xml (revision 0)
> @@ -0,0 +1,98 @@
> +<?xml version='1.0' encoding='UTF-8'?>
> +<!--
> +
> + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
> +
> + Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved.
> +
> + The contents of this file are subject to the terms of either the GNU
> + General Public License Version 2 only ("GPL") or the Common Development
> + and Distribution License("CDDL") (collectively, the "License"). You
> + may not use this file except in compliance with the License. You can
> + obtain a copy of the License at
> + https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
> + or packager/legal/LICENSE.txt. See the License for the specific
> + language governing permissions and limitations under the License.
> +
> + When distributing the software, include this License Header Notice in each
> + file and include the License file at packager/legal/LICENSE.txt.
> +
> + GPL Classpath Exception:
> + Oracle designates this particular file as subject to the "Classpath"
> + exception as provided by Oracle in the GPL Version 2 section of the License
> + file that accompanied this code.
> +
> + Modifications:
> + If applicable, add the following below the License Header, with the fields
> + enclosed by brackets [] replaced by your own identifying information:
> + "Portions Copyright [year] [name of copyright owner]"
> +
> + Contributor(s):
> + If you wish your version of this file to be governed by only the CDDL or
> + only the GPL Version 2, indicate your decision by adding "[Contributor]
> + elects to include this software in this distribution under the [CDDL or GPL
> + Version 2] license." If you don't indicate a single choice of license, a
> + recipient has the option to distribute your version of this file under
> + either the CDDL, the GPL Version 2 or to extend the choice of license to
> + its licensees as provided above. However, if you add GPL Version 2 code
> + and therefore, elected the GPL Version 2 license, then the option applies
> + only if the new code is made subject to such option by the copyright
> + holder.
> +
> +-->
> +
> +<!-- ************ JSF build file ************************************** -->
> +
> +<project name="JAVASERVERFACES-2033" default="test" basedir=".">
> +
> + <property file="../../build.properties"/>
> + <path id="2033.classpath">
> + <path refid="html.classpath" />
> + <pathelement location="${basedir}/htmlunit/target/classes"/>
> + </path>
> +
> + <import file="${jsf.build.home}/common/ant/common.xml"/>
> +
> + <target name="build">
> +
> + <jsf.mvn dir="${basedir}/i_jsf_2033_war" goals="install" />
> +
> + </target>
> +
> + <target name="clean">
> +
> + <jsf.mvn dir="${basedir}/i_jsf_2033_war" goals="clean" />
> +
> + </target>
> +
> + <target name="install">
> + <deploydir.artifact
> + explodedWarDir="${basedir}/i_jsf_2033_war/target/i_jsf_2033_war"
> + appName="i_jsf_2033_war"/>
> +
> + </target>
> +
> + <target name="remove">
> +
> + <undeploy.artifact
> + artifact="${basedir}/i_jsf_2033_war/target/i_jsf_2033_war"
> + appName="i_jsf_2033_war"/>
> +
> + </target>
> +
> + <target name="test" depends="define.scenario.aware.port">
> +
> + <jsf.junit context-path="/i_jsf_2033"
> + classpath-refid="2033.classpath"
> + test-results-dir="${regression.test.results.dir}">
> + <tests>
> + <fileset dir="${basedir}/htmlunit/target/classes"
> + includes="com/sun/faces/systest/Issue2033TestCase.class"/>
> + </tests>
> + </jsf.junit>
> +
> + </target>
> +
> +
> +
> +</project>
>
>
> SECTION: New Files
> ----------------------------
> SEE ATTACHMENTS
>
> --
> | edward.burns_at_oracle.com | office: +1 407 458 0017
> | homepage: | http://ridingthecrest.com/
> | 23 Business Days til JSF 2.2 Early Draft Review
> | 59 Business Days til JSF 2.2 Public Review
> | 147 Business Days til JSF 2.2 Proposed Final Draft