You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2011/04/09 20:28:55 UTC
svn commit: r1090646 [1/3] - in
/myfaces/myfaces-build-tools/trunk/maven2-archetypes: ./
myfaces-archetype-jsfcomponents20/ myfaces-archetype-jsfcomponents20/src/
myfaces-archetype-jsfcomponents20/src/main/
myfaces-archetype-jsfcomponents20/src/main/re...
Author: lu4242
Date: Sat Apr 9 18:28:53 2011
New Revision: 1090646
URL: http://svn.apache.org/viewvc?rev=1090646&view=rev
Log:
Add myfaces-archetype-jsfcomponents20 archetype
Added:
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/ (with props)
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/pom.xml
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/META-INF/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/META-INF/LICENSE.txt
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/META-INF/NOTICE.txt
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/META-INF/maven/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/META-INF/maven/archetype-metadata.xml
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/pom.xml
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/component/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/component/sayhello/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/component/sayhello/AbstractSayHello.java
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/component/sayhello/SayHelloRenderer.java
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/converter/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/converter/PhoneNumber.java
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/converter/PhoneNumberConverter.java
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/validator/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/validator/AbstractOddNumberValidator.java
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/resources/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/resources/META-INF/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/resources/META-INF/componentClass20.vm
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/resources/META-INF/facelets-taglib20.vm
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/resources/META-INF/faces-config20.vm
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/resources/META-INF/mycomponents.tld.vm
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/resources/META-INF/tagClass12.vm
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/resources/META-INF/tagConverterClass12.vm
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/resources/META-INF/tagValidatorClass12.vm
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/resources/META-INF/validatorClass12.vm
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/test/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/test/java/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/test/java/org/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/test/java/org/myorganization/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/test/java/org/myorganization/component/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/test/java/org/myorganization/component/sayhello/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/test/java/org/myorganization/component/sayhello/SayHelloRendererTest.java
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/test/java/org/myorganization/converter/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/test/java/org/myorganization/converter/PhoneNumberConverterTest.java
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/test/java/org/myorganization/validator/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/test/java/org/myorganization/validator/OddNumberValidatorTest.java
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/pom.xml
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/java/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/java/org/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/java/org/myorganization/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/java/org/myorganization/component/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/java/org/myorganization/component/example/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/java/org/myorganization/component/example/SayHelloBean.java
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/log4j/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/log4j/log4j.properties
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/resources/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/resources/org/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/resources/org/myorganization/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/resources/org/myorganization/component/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/resources/org/myorganization/component/example/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/resources/org/myorganization/component/example/build.properties
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/resources/org/myorganization/component/example/messages.properties
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/resources/org/myorganization/component/example/messages_en.properties
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/META-INF/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/META-INF/templates/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/META-INF/templates/example.xhtml
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/WEB-INF/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/WEB-INF/examples-config.xml
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/WEB-INF/faces-config.xml
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/WEB-INF/web.xml
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/converterDemo.xhtml
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/converterDemoResult.xhtml
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/home.xhtml
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/index.html
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/resources/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/resources/css/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/resources/css/style.css
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/resources/testcc/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/resources/testcc/sayHelloCC.xhtml
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/sayhello.xhtml
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/sayhellocc.xhtml
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/validatorDemo.xhtml
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/examples/src/main/webapp/validatorDemoResult.xhtml
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/pom.xml
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/site/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/site/apt/
myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/site/apt/index.apt
Modified:
myfaces/myfaces-build-tools/trunk/maven2-archetypes/pom.xml
Propchange: myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Apr 9 18:28:53 2011
@@ -0,0 +1,12 @@
+*.iml
+*.ipr
+*.iws
+*.jdbc
+.classpath
+.externalToolBuilders
+.project
+.settings
+derby.log
+maven-eclipse.xml
+myfacesOrchestraDB
+target
Added: myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/pom.xml?rev=1090646&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/pom.xml (added)
+++ myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/pom.xml Sat Apr 9 18:28:53 2011
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<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/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.apache.myfaces.buildtools</groupId>
+ <artifactId>myfaces-archetype-parent</artifactId>
+ <version>1.0.3-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.myfaces.buildtools</groupId>
+ <artifactId>myfaces-archetype-jsfcomponents20</artifactId>
+ <packaging>jar</packaging>
+ <name>JSF Component Library Archetype For JSF 2.0</name>
+ <description>Archetype to create a libary project of JSF 2.0 components </description>
+</project>
Added: myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/META-INF/LICENSE.txt
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/META-INF/LICENSE.txt?rev=1090646&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/META-INF/LICENSE.txt (added)
+++ myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/META-INF/LICENSE.txt Sat Apr 9 18:28:53 2011
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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.
Added: myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/META-INF/NOTICE.txt
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/META-INF/NOTICE.txt?rev=1090646&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/META-INF/NOTICE.txt (added)
+++ myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/META-INF/NOTICE.txt Sat Apr 9 18:28:53 2011
@@ -0,0 +1,16 @@
+=========================================================================
+== NOTICE file corresponding to section 4(d) of the Apache License, ==
+== Version 2.0, in this case for the Apache MyFaces Maven Plugins ==
+=========================================================================
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+Portions of this software were originally based on the following:
+
+ - software copyright (c) 2000-2006, Oracle Corp, <http://www.oracle.com/>.
+and are licensed to the Apache Software Foundation under the
+"Software Grant and Corporate Contribution License Agreement"
+
+See the LICENSE.txt file for information on all licenses
+associated with this software.
Added: myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/META-INF/maven/archetype-metadata.xml
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/META-INF/maven/archetype-metadata.xml?rev=1090646&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/META-INF/maven/archetype-metadata.xml (added)
+++ myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/META-INF/maven/archetype-metadata.xml Sat Apr 9 18:28:53 2011
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<archetype-descriptor xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"
+
+ name="myfaces-archetype-jsfcomponents" partial="false">
+
+ <requiredProperties/>
+
+ <modules>
+ <module dir="core" name="My JSF Components Library">
+ <fileSets>
+ <!-- no packaging - source already uses package org.myorganization -->
+ <fileSet filtered="false" packaged="false">
+ <directory>src/main/java/</directory>
+ </fileSet>
+ <fileSet filtered="false" packaged="false">
+ <directory>src/test/java/</directory>
+ </fileSet>
+ <fileSet filtered="false" packaged="false">
+ <directory>src/main/resources/</directory>
+ </fileSet>
+ </fileSets>
+ </module>
+
+ <module dir="examples" name="My Components Examples">
+ <fileSets>
+ <!-- no packaging - source already uses package org.myorganization -->
+ <fileSet filtered="false" packaged="false">
+ <directory>src/main/java/</directory>
+ </fileSet>
+ <fileSet filtered="false" packaged="false">
+ <directory>src/main/log4j/</directory>
+ </fileSet>
+ <fileSet filtered="false" packaged="false">
+ <directory>src/main/resources/</directory>
+ </fileSet>
+ <fileSet filtered="false" packaged="false">
+ <directory>src/main/webapp/</directory>
+ </fileSet>
+ </fileSets>
+ </module>
+ </modules>
+
+</archetype-descriptor>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Added: myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/pom.xml?rev=1090646&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/pom.xml (added)
+++ myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/pom.xml Sat Apr 9 18:28:53 2011
@@ -0,0 +1,267 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<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/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>${groupId}</groupId>
+ <artifactId>${artifactId}-project</artifactId>
+ <version>${version}</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>${artifactId}-core</artifactId>
+ <packaging>jar</packaging>
+ <name>My JSF Components Library</name>
+
+ <description>
+ This is my super jsf components library.
+ </description>
+
+ <properties>
+ <shortname>mycomponents</shortname>
+ </properties>
+
+ <dependencies>
+
+ <!-- compile -->
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.1</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.myfaces.commons</groupId>
+ <artifactId>myfaces-validators20</artifactId>
+ <version>1.0.1</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.myfaces.commons</groupId>
+ <artifactId>myfaces-converters20</artifactId>
+ <version>1.0.1</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <!-- provided dependencies -->
+
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.myfaces.buildtools</groupId>
+ <artifactId>myfaces-builder-annotations</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- test dependencies -->
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.myfaces.test</groupId>
+ <artifactId>myfaces-test20</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <excludes>
+ <exclude>**/*.vm</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.myfaces.buildtools</groupId>
+ <artifactId>myfaces-builder-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>build-metadata</goal>
+ <goal>make-components</goal>
+ <goal>make-tags</goal>
+ <goal>make-validators</goal>
+ <goal>make-converter-tags</goal>
+ <goal>make-validator-tags</goal>
+ </goals>
+ <configuration>
+ <jsfVersion>2.0</jsfVersion>
+ </configuration>
+ </execution>
+ <execution>
+ <id>make_facesconfig</id>
+ <configuration>
+ <xmlFile>META-INF/faces-config.xml</xmlFile>
+ </configuration>
+ <goals>
+ <goal>make-config</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>maketld</id>
+ <configuration>
+ <xmlFile>META-INF/${symbol_dollar}{shortname}.tld</xmlFile>
+ <templateFile>mycomponents.tld.vm</templateFile>
+ <params>
+ <shortname>${symbol_dollar}{shortname}</shortname>
+ <uri>http://www.myorganitzation.org/${symbol_dollar}{shortname}</uri>
+ <displayname>Custom tag library.</displayname>
+ <description>Enhanced standard JSP actions and custom MyFaces actions.</description>
+ </params>
+ </configuration>
+ <goals>
+ <goal>make-config</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>make_taglib</id>
+ <configuration>
+ <outputDirectory>${symbol_dollar}{basedir}/src/main/resources</outputDirectory>
+ <xmlFile>META-INF/${symbol_dollar}{shortname}.taglib.xml</xmlFile>
+ <templateFile>facelets-taglib20.vm</templateFile>
+ <params>
+ <shortname>${symbol_dollar}{shortname}</shortname>
+ <uri>http://www.myorganitzation.org/${symbol_dollar}{shortname}</uri>
+ </params>
+ </configuration>
+ <goals>
+ <goal>make-config</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.4</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <version>2.1</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.4.3</version>
+ </plugin>
+ </plugins>
+ </reporting>
+
+ <profiles>
+ <profile>
+ <id>generate-site</id>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>net.sourceforge.maven-taglib</groupId>
+ <artifactId>maven-taglib-plugin</artifactId>
+ <version>2.3.1</version>
+ <configuration>
+ <taglib.src.dir>${symbol_dollar}{basedir}/target/classes/META-INF</taglib.src.dir>
+ <tldDocDir>${symbol_dollar}{basedir}/target/site/tlddoc</tldDocDir>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+ </profile>
+ <profile>
+ <id>generate-assembly</id>
+ <activation>
+ <property>
+ <name>performRelease</name>
+ <value>true</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.4</version>
+ <executions>
+ <execution>
+ <id>attach-javadoc</id>
+ <goals><goal>jar</goal></goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>net.sourceforge.maven-taglib</groupId>
+ <artifactId>maven-taglib-plugin</artifactId>
+ <version>2.3.1</version>
+ <configuration>
+ <taglib.src.dir>${symbol_dollar}{basedir}/target/classes/META-INF</taglib.src.dir>
+ <tldDocDir>${symbol_dollar}{basedir}/target/site/tlddoc</tldDocDir>
+ </configuration>
+ <executions>
+ <execution>
+ <id>attach-javadoc</id>
+ <goals><goal>taglibdocjar</goal></goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
Added: myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/component/sayhello/AbstractSayHello.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/component/sayhello/AbstractSayHello.java?rev=1090646&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/component/sayhello/AbstractSayHello.java (added)
+++ myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/component/sayhello/AbstractSayHello.java Sat Apr 9 18:28:53 2011
@@ -0,0 +1,60 @@
+/*
+ * 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.myorganization.component.sayhello;
+
+import javax.faces.component.UIOutput;
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFComponent;
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty;
+
+/**
+ *
+ *
+ */
+@JSFComponent(
+ name = "mycomponents:sayHello",
+ clazz="org.myorganization.component.sayhello.SayHello",
+ tagClass = "org.myorganization.component.sayhello.SayHelloTag")
+public abstract class AbstractSayHello extends UIOutput
+{
+ public static final String COMPONENT_TYPE = "org.myorganization.SayHello";
+ public static final String DEFAULT_RENDERER_TYPE = "org.myorganization.SayHelloRenderer";
+ public static final String COMPONENT_FAMILY = "javax.faces.Output";
+
+ /**
+ * User's first name.
+ *
+ */
+ @JSFProperty
+ public abstract String getFirstName();
+
+
+ /**
+ * User's last name.
+ *
+ */
+ @JSFProperty
+ public abstract String getLastName();
+
+ /**
+ * Rendered property.
+ *
+ */
+ @JSFProperty(defaultValue="true")
+ public abstract boolean isRendered();
+}
Added: myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/component/sayhello/SayHelloRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/component/sayhello/SayHelloRenderer.java?rev=1090646&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/component/sayhello/SayHelloRenderer.java (added)
+++ myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/component/sayhello/SayHelloRenderer.java Sat Apr 9 18:28:53 2011
@@ -0,0 +1,87 @@
+/*
+ * 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.myorganization.component.sayhello;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.render.Renderer;
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFRenderer;
+
+/**
+ *
+ */
+@JSFRenderer(
+ renderKitId = "HTML_BASIC",
+ family = "javax.faces.Output",
+ type = "org.myorganization.SayHelloRenderer")
+public class SayHelloRenderer extends Renderer
+{
+
+ public void decode(FacesContext facesContext, UIComponent uiComponent)
+ {
+ super.decode(facesContext, uiComponent);
+ // nothing to decode
+ }
+
+ public void encodeBegin(FacesContext facesContext, UIComponent uiComponent) throws IOException
+ {
+ super.encodeBegin(facesContext, uiComponent);
+ // no need to use encodeBegin.
+ }
+
+ public void encodeChildren(FacesContext facesContext, UIComponent uiComponent) throws IOException
+ {
+ super.encodeChildren(facesContext, uiComponent);
+ // this component does not have children
+ }
+
+ public void encodeEnd(FacesContext facesContext, UIComponent uiComponent) throws IOException
+ {
+ super.encodeEnd(facesContext, uiComponent);
+
+ if (!uiComponent.isRendered())
+ {
+ return;
+ }
+
+ ResponseWriter writer = facesContext.getResponseWriter();
+
+ SayHello sayHello = (SayHello) uiComponent;
+
+ String firstName = sayHello.getFirstName();
+ String lastName = sayHello.getLastName();
+
+ writer.write("Hello ");
+
+ if (firstName != null)
+ {
+ writer.write(firstName);
+ }
+
+ if (lastName != null)
+ {
+ writer.write(" "+lastName);
+ }
+
+ writer.write("!");
+ }
+}
Added: myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/converter/PhoneNumber.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/converter/PhoneNumber.java?rev=1090646&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/converter/PhoneNumber.java (added)
+++ myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/converter/PhoneNumber.java Sat Apr 9 18:28:53 2011
@@ -0,0 +1,54 @@
+/*
+ * 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.myorganization.converter;
+
+public class PhoneNumber
+{
+ private String areaCode;
+ private String number;
+
+ public PhoneNumber(String number)
+ {
+ this.number = number;
+ }
+
+ public PhoneNumber(String areaCode, String number)
+ {
+ this(number);
+ this.areaCode = areaCode;
+ }
+
+ public String getAreaCode()
+ {
+ return areaCode;
+ }
+ public void setAreaCode(String areaCode)
+ {
+ this.areaCode = areaCode;
+ }
+ public String getNumber()
+ {
+ return number;
+ }
+ public void setNumber(String number)
+ {
+ this.number = number;
+ }
+
+}
Added: myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/converter/PhoneNumberConverter.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/converter/PhoneNumberConverter.java?rev=1090646&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/converter/PhoneNumberConverter.java (added)
+++ myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/converter/PhoneNumberConverter.java Sat Apr 9 18:28:53 2011
@@ -0,0 +1,77 @@
+/*
+ * 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.myorganization.converter;
+
+import java.util.regex.Pattern;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFConverter;
+
+/**
+ *
+ */
+@JSFConverter(
+ name = "mycomponents:phoneNumberConverter",
+ tagClass = "org.myorganization.converter.PhoneNumberConverterTag")
+public class PhoneNumberConverter
+ implements Converter
+{
+ public static final String CONVERTER_ID = "javax.faces.PhoneNumber";
+
+ private static final Pattern PHONE_NUMBER_PATTERN = Pattern.compile("(\\d)*?(-)??(\\d)++");
+
+ public Object getAsObject(FacesContext context, UIComponent component, String value)
+ throws ConverterException
+ {
+ if (!PHONE_NUMBER_PATTERN.matcher(value).matches())
+ {
+ throw new ConverterException(new FacesMessage("Cannot convert phone number. Insert a number like 1-5555555"));
+ }
+
+ String [] strPhone = value.split("-");
+ PhoneNumber objPhone = null;
+ if(strPhone.length == 2)
+ {
+ objPhone = new PhoneNumber(strPhone[0], strPhone[1]);
+ }
+ else if(strPhone.length == 1)
+ {
+ objPhone = new PhoneNumber(strPhone[0]);
+ }
+
+ return objPhone;
+ }
+
+ public String getAsString(FacesContext context, UIComponent component, Object value)
+ throws ConverterException
+ {
+ if(value != null)
+ {
+ PhoneNumber phone = (PhoneNumber)value;
+ return phone.getAreaCode() + "-" + phone.getNumber();
+ }
+
+ return null;
+ }
+
+}
Added: myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/validator/AbstractOddNumberValidator.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/validator/AbstractOddNumberValidator.java?rev=1090646&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/validator/AbstractOddNumberValidator.java (added)
+++ myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/java/org/myorganization/validator/AbstractOddNumberValidator.java Sat Apr 9 18:28:53 2011
@@ -0,0 +1,53 @@
+/*
+ * 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.myorganization.validator;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFValidator;
+import org.apache.myfaces.commons.validator.ValidatorBase;
+
+/**
+ *
+ */
+@JSFValidator(
+ name = "mycomponents:validateOddNum",
+ clazz = "org.myorganization.validator.OddNumberValidator",
+ tagClass = "org.myorganization.validator.OddNumberValidatorTag")
+public abstract class AbstractOddNumberValidator extends ValidatorBase
+{
+ public static final String VALIDATOR_ID = "org.myorganization.validator.OddNumberValidator";
+
+ public void validate(FacesContext arg0, UIComponent component, Object value)
+ throws ValidatorException
+ {
+ if(!(value instanceof Integer)) {
+ throw new ValidatorException(new FacesMessage("Please enter an integer."));
+ }
+
+ int intVal = ((Integer)value).intValue();
+ if(intVal % 2 == 0) {
+ throw new ValidatorException(new FacesMessage("Please enter an odd number."));
+ }
+ }
+}
Added: myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/resources/META-INF/componentClass20.vm
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/resources/META-INF/componentClass20.vm?rev=1090646&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/resources/META-INF/componentClass20.vm (added)
+++ myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents20/src/main/resources/archetype-resources/core/src/main/resources/META-INF/componentClass20.vm Sat Apr 9 18:28:53 2011
@@ -0,0 +1,518 @@
+## Velocity template used to generate JSF1.2-compatible component classes
+## from component meta-data.
+##
+## Note that there are two types of component generation:
+## * "subclass mode" (use annotated class as a parent class)
+## * "template mode" (use annotated class as a template)
+## This template file is used for both.
+##
+## Variable $component refers to a ComponentMeta object to process
+## Variable $utils refers to an instance of MyfacesUtils.
+##
+## When "template mode" is being used then variable $innersource
+## holds a String containing all the non-abstract functions defined
+## in the annotated class.
+##
+## The java package of the generated class is always the same as
+## the package in which the annotated class exists.
+##
+/*
+ * 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 ${component.packageName};
+
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.component.PartialStateHolder;
+import javax.faces.component.StateHolder;
+##import org.apache.myfaces.component.AttachedDeltaWrapper;
+$utils.importTagClasses($component)
+
+#if ($component.isTemplate())
+#set ($generatedClassParent = $component.sourceClassParentClassName)
+#else
+#set ($generatedClassParent = $component.sourceClassName)
+#end
+// Generated from class ${component.sourceClassName}.
+//
+// WARNING: This file was automatically generated. Do not edit it directly,
+// or you will lose your changes.
+public class ${utils.getClassFromFullClass($component.className)} extends $generatedClassParent
+#if ($component.implements)
+ implements $component.implements
+#end
+{
+#if ($component.serialuid)
+ private static final long serialVersionUID = ${component.serialuid};
+#end
+
+ static public final String COMPONENT_FAMILY =
+ "$component.family";
+ static public final String COMPONENT_TYPE =
+ "$component.type";
+#if ($component.rendererType)
+#if (!($component.rendererType == ""))
+ static public final String DEFAULT_RENDERER_TYPE =
+ "$component.rendererType";
+#end
+#end
+
+#if ($innersource)
+ //BEGIN CODE COPIED FROM $component.sourceClassName
+$innersource
+ //END CODE COPIED FROM $component.sourceClassName
+#end
+
+ public ${utils.getClassFromFullClass($component.className)}()
+ {
+#if ($component.rendererType)
+#if ($component.rendererType == "")
+ setRendererType(null);
+#else
+ setRendererType("$component.rendererType");
+#end
+#else
+ setRendererType(null);
+#end
+ }
+
+## On myfaces 1.1 the family is inherited, so this could be commented
+## On other this should not be commented
+ public String getFamily()
+ {
+ return COMPONENT_FAMILY;
+ }
+
+## Iterate over full component property list
+#set ($propertyList = ${component.propertyList})
+
+## TODO: this condition should be checked for parent components
+## and csv implements
+#if ($component.isClientBehaviorHolder())
+#if ($component.isOverrideEventNames())
+ static private final java.util.Collection<String> CLIENT_EVENTS_LIST =
+ java.util.Collections.unmodifiableCollection(
+ java.util.Arrays.asList(
+#set ($commavar = "")
+#foreach( $property in $propertyList )
+#if ($property.clientEvent)
+#if ($property.clientEvent != "")
+ $commavar "$property.clientEvent"
+#set ($commavar = ",")
+#end
+#end
+#end
+ ));
+
+ public java.util.Collection<String> getEventNames()
+ {
+ return CLIENT_EVENTS_LIST;
+ }
+#end
+#end
+#if ($component.defaultEventName)
+#if ($component.isOverrideDefaultEventName())
+
+ //ClientBehaviorHolder default: $component.defaultEventName
+ public String getDefaultEventName()
+ {
+ return "$component.defaultEventName";
+ }
+#end
+#end
+
+#set ($propertyList = ${component.propertyComponentList})
+
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $utils.getClassFromFullClass($property.className))
+#if($utils.getDefaultValueField($property))
+#set ($defaultValue = $utils.getDefaultValueField($property))
+#else
+#set ($defaultValue = false)
+#end
+ // Property: $property.name
+#if ($property.isPartialStateHolder())
+#if ($property.isLiteralOnly() || $property.isTagExcluded() )
+ private $type $field #if($defaultValue) = $defaultValue;#{else};#{end}
+
+
+#else
+ private $type $field;
+
+#end
+
+ private boolean _$utils.getPrefixedPropertyName("isSet", $property.name)()
+ {
+ Boolean value = (Boolean) getStateHelper().get(PropertyKeys.${property.name}Set);
+ return value == null ? false : value;
+ }
+
+#if($utils.isPrimitiveClass($type) && !$property.isTagExcluded()
+ && !$property.isLiteralOnly() )
+ private boolean ${field}Set;
+
+#if ($property.isSetMethod())
+ $property.setMethodScope boolean $utils.getPrefixedPropertyName("isSet", $property.name)()
+ {
+ return ${field}Set;
+ }
+#end
+#end
+#if($property.isLocalMethod())
+#if("boolean" == $type)
+#set ($methodName = $utils.getPrefixedPropertyName("isLocal", $property.name))
+#else
+#set ($methodName = $utils.getPrefixedPropertyName("getLocal", $property.name))
+#end
+ final $property.localMethodScope $type ${methodName}()
+ {
+ return $field;
+ }
+
+#end
+ public $type $utils.getMethodReaderFromProperty($property.name, $type)()
+ {
+#if ($property.isTagExcluded() || $property.isLiteralOnly())
+ return $field;
+#else
+#if ($utils.isPrimitiveClass($type))
+ if (${field}Set)
+#else
+ if ($field != null)
+#end
+ {
+ return $field;
+ }
+ ValueExpression vb = getValueExpression("$property.name");
+ if (vb != null)
+ {
+#if ($utils.isPrimitiveClass($type))
+ return ($utils.castIfNecessary($type) vb.getValue(getFacesContext().getELContext())).${type}Value();
+#else
+#set ($pritype = $utils.getPrimitiveType($property.className))
+#if ($utils.isPrimitiveClass($pritype))
+ Object value = vb == null ? null : vb.getValue(getFacesContext().getELContext());
+ if (!(value instanceof $type)){
+ value = ${type}.valueOf(value.toString());
+ }
+ return $utils.castIfNecessary($type) value;
+#else
+ return $utils.castIfNecessary($type) vb.getValue(getFacesContext().getELContext());
+#end
+#end
+ }
+#if ($defaultValue)
+ return $defaultValue;
+#elseif ($utils.isPrimitiveClass($type))
+ return $utils.primitiveDefaultValue($type);
+#else
+ return null;
+#end
+#end
+ }
+
+ public void $utils.getPrefixedPropertyName("set", $property.name)($type $utils.getVariableFromName($property.name))
+ {
+ this.$field = $utils.getVariableFromName($property.name);
+ if (initialStateMarked())
+ {
+ getStateHelper().put(PropertyKeys.${property.name}Set,Boolean.TRUE);
+ }
+#if ($utils.isPrimitiveClass($type) && !$property.isTagExcluded() )
+ this.${field}Set = true;
+#end
+ }
+#else
+## StateHelper aware property
+#if ($property.name == "for")
+## To keep compatibility with RI, we should call it forVal
+#set ($field = "forVal")
+#else
+#set ($field = $property.name)
+#end
+#if ($property.isSetMethod())
+ $property.setMethodScope boolean $utils.getPrefixedPropertyName("isSet", $property.name)()
+ {
+ return getStateHelper().get(PropertyKeys.$field) != null;
+ }
+#end
+#if($property.isLocalMethod())
+#if("boolean" == $type)
+#set ($methodName = $utils.getPrefixedPropertyName("isLocal", $property.name))
+#else
+#set ($methodName = $utils.getPrefixedPropertyName("getLocal", $property.name))
+#end
+ final $property.localMethodScope $type ${methodName}()
+ {
+ return $utils.castIfNecessary($type) getStateHelper().get(PropertyKeys.$field);
+ }
+
+#end
+ public $type $utils.getMethodReaderFromProperty($property.name, $type)()
+ {
+#if ($property.isLiteralOnly())
+#if ($defaultValue)
+ Object value = getStateHelper().get(PropertyKeys.$field);
+ if (value != null)
+ {
+ return $utils.castIfNecessary($type) value;
+ }
+ return $defaultValue;
+#elseif ($utils.isPrimitiveClass($type))
+ Object value = getStateHelper().get(PropertyKeys.$field);
+ if (value != null)
+ {
+ return $utils.castIfNecessary($type) value;
+ }
+ return $utils.primitiveDefaultValue($type);
+#else
+ return $utils.castIfNecessary($type) getStateHelper().get(PropertyKeys.$field);
+#end
+#else
+#if ($defaultValue)
+ return $utils.castIfNecessary($type) getStateHelper().eval(PropertyKeys.$field, $defaultValue);
+#elseif ($utils.isPrimitiveClass($type))
+ Object value = $utils.castIfNecessary($type) getStateHelper().eval(PropertyKeys.$field);
+ if (value != null)
+ {
+ return $utils.castIfNecessary($type) value;
+ }
+ return $utils.primitiveDefaultValue($type);
+#else
+ return $utils.castIfNecessary($type) getStateHelper().eval(PropertyKeys.$field);
+#end
+#end
+ }
+
+ public void $utils.getPrefixedPropertyName("set", $property.name)($type $utils.getVariableFromName($property.name))
+ {
+ getStateHelper().put(PropertyKeys.$field, $utils.getVariableFromName($property.name) );
+ }
+#end
+#end
+
+ protected enum PropertyKeys
+ {
+#set ($comma = "")
+#set ($addc = "false")
+#foreach( $property in $propertyList )
+#if ($property.name == "for")
+#set ($addc = "true")
+## To keep compatibility with RI, we should call it forVal
+#set ($field = "forVal")
+#else
+#set ($field = $property.name)
+#end
+#set ($type = $utils.getClassFromFullClass($property.className))
+#if($utils.getDefaultValueField($property))
+#set ($defaultValue = $utils.getDefaultValueField($property))
+#else
+#set ($defaultValue = false)
+#end
+#if ($property.name == "for")
+ $comma $field("for")
+#else
+#if ($property.isPartialStateHolder())
+ $comma ${field}Set
+#else
+ $comma $field
+#end
+#end
+#set($comma = ",")
+#end
+#if ("true" == $addc)
+ ;
+ String c;
+
+ PropertyKeys()
+ {
+ }
+
+ //Constructor needed by "for" property
+ PropertyKeys(String c)
+ {
+ this.c = c;
+ }
+
+ public String toString()
+ {
+ return ((this.c != null) ? this.c : super.toString());
+ }
+#end
+ }
+
+#set ($primitiveCount = 1) ## $propertyList.size() + 1
+#foreach( $property in $propertyList )
+#if ($property.isPartialStateHolder())
+#set ($primitiveCount = $primitiveCount + 1)
+#if($utils.isPrimitiveClass($property.className))
+#set ($primitiveCount = $primitiveCount + 1)
+#end
+#end
+#end
+## saveState and restoreState methods only has sense if we have properties
+## that does not use StateHelper class.
+#if ($primitiveCount > 1)
+
+ public void markInitialState()
+ {
+ super.markInitialState();
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#if ($property.isPartialStateHolder())
+ if ($field != null &&
+ $field instanceof PartialStateHolder)
+ {
+ ((PartialStateHolder)$field).markInitialState();
+ }
+#end
+#end
+ }
+
+ public void clearInitialState()
+ {
+ if (initialStateMarked())
+ {
+ super.clearInitialState();
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#if ($property.isPartialStateHolder())
+## //Only has sense propagate this method if is initialStateMarked
+ if ($field != null &&
+ $field instanceof PartialStateHolder)
+ {
+ ((PartialStateHolder)$field).clearInitialState();
+ }
+#end
+#end
+ }
+ }
+
+ @Override
+ public Object saveState(FacesContext facesContext)
+ {
+ if (initialStateMarked())
+ {
+ boolean nullDelta = true;
+ Object parentSaved = super.saveState(facesContext);
+#set ($arrayIndex = 0)
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $property.className)
+#if ($property.isPartialStateHolder())
+#set ($arrayIndex = $arrayIndex + 1)
+ Object ${property.name}Saved = null;
+ if (!_$utils.getPrefixedPropertyName("isSet", $property.name)() &&
+ $field != null && $field instanceof PartialStateHolder)
+ {
+ //Delta
+ StateHolder holder = (StateHolder) $field;
+ if (!holder.isTransient())
+ {
+ Object attachedState = holder.saveState(facesContext);
+ if (attachedState != null)
+ {
+ nullDelta = false;
+ }
+ ${property.name}Saved = new AttachedDeltaWrapper(${field}.getClass(),
+ attachedState);
+ }
+ }
+ else if (_$utils.getPrefixedPropertyName("isSet", $property.name)() || $field != null )
+ {
+ //Full
+ ${property.name}Saved = saveAttachedState(facesContext,$field);
+ nullDelta = false;
+ }
+## StateHelper Properties does not need save and restore
+#end
+#end
+ if (parentSaved == null && nullDelta)
+ {
+ //No values
+ return null;
+ }
+
+ Object[] values = new Object[$primitiveCount];
+ values[0] = parentSaved;
+## Save full state
+#set ($arrayIndex = 0)
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $property.className)
+#if ($property.isPartialStateHolder())
+#set ($arrayIndex = $arrayIndex + 1)
+ values[$arrayIndex] = ${property.name}Saved;
+## StateHelper Properties does not need save and restore
+#end
+#end
+ return values;
+ }
+ else
+ {
+ Object[] values = new Object[$primitiveCount];
+ values[0] = super.saveState(facesContext);
+## Save full state
+#set ($arrayIndex = 0)
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $property.className)
+#if ($property.isPartialStateHolder())
+#set ($arrayIndex = $arrayIndex + 1)
+ values[$arrayIndex] = saveAttachedState(facesContext,$field);
+## StateHelper Properties does not need save and restore
+#end
+#end
+ return values;
+ }
+ }
+
+ @Override
+ public void restoreState(FacesContext facesContext, Object state)
+ {
+ if (state == null)
+ {
+ return;
+ }
+
+ Object[] values = (Object[])state;
+ super.restoreState(facesContext,values[0]);
+#set ($arrayIndex = 0)
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $property.className)
+#if ($property.isPartialStateHolder())
+#set ($arrayIndex = $arrayIndex + 1)
+ if (values[$arrayIndex] instanceof AttachedDeltaWrapper)
+ {
+ //Delta
+ ((StateHolder)$field).restoreState(facesContext, ((AttachedDeltaWrapper) values[$arrayIndex]).getWrappedStateObject());
+ }
+ else
+ {
+ //Full
+ $field = $utils.castIfNecessary($type) restoreAttachedState(facesContext,values[$arrayIndex]);
+ }
+#else
+## StateHelper Properties does not need save and restore
+#end
+#end
+ }
+#end
+}