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 2008/11/22 08:28:00 UTC
svn commit: r719822 - in /myfaces/commons/branches/jsf_11: ./
myfaces-commons-components/ myfaces-commons-components/src/
myfaces-commons-components/src/main/
myfaces-commons-components/src/main/java/
myfaces-commons-components/src/main/java/org/ myfac...
Author: lu4242
Date: Fri Nov 21 23:28:00 2008
New Revision: 719822
URL: http://svn.apache.org/viewvc?rev=719822&view=rev
Log:
create myfaces commons components module with mc:renderOne
Added:
myfaces/commons/branches/jsf_11/myfaces-commons-components/ (with props)
myfaces/commons/branches/jsf_11/myfaces-commons-components/pom.xml (with props)
myfaces/commons/branches/jsf_11/myfaces-commons-components/src/
myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/
myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/java/
myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/java/org/
myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/java/org/apache/
myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/java/org/apache/myfaces/
myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/
myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/renderOne/
myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/renderOne/AbstractUIRenderOne.java (with props)
myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/
myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/
myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/componentClass11.vm
myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/facelets-taglib.vm
myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/faces-config11.vm
myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/tagClass11.vm
myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/tomahawk.vm
myfaces/commons/branches/jsf_11/myfaces-commons-components/src/test/
myfaces/commons/branches/jsf_11/myfaces-commons-components/src/test/java/
myfaces/commons/branches/jsf_11/myfaces-commons-components/src/test/resources/
Modified:
myfaces/commons/branches/jsf_11/pom.xml
Propchange: myfaces/commons/branches/jsf_11/myfaces-commons-components/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Nov 21 23:28:00 2008
@@ -0,0 +1,10 @@
+target
+.classpath
+.project
+.wtpmodules
+*.ipr
+*.iml
+*.iws
+.settings
+maven-eclipse.xml
+.externalToolBuilders
Added: myfaces/commons/branches/jsf_11/myfaces-commons-components/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/myfaces-commons-components/pom.xml?rev=719822&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/myfaces-commons-components/pom.xml (added)
+++ myfaces/commons/branches/jsf_11/myfaces-commons-components/pom.xml Fri Nov 21 23:28:00 2008
@@ -0,0 +1,328 @@
+<?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">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.myfaces.commons</groupId>
+ <artifactId>commons11</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>myfaces-components11</artifactId>
+ <packaging>jar</packaging>
+ <name>Apache MyFaces Commons Components</name>
+
+ <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>
+ <version>1.0.2</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>build-metadata</goal>
+ <goal>make-components</goal>
+ <goal>make-tags</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>makefacesconfig</id>
+ <configuration>
+ <templateFile>faces-config11.vm</templateFile>
+ <xmlFile>META-INF/faces-config.xml</xmlFile>
+ </configuration>
+ <goals>
+ <goal>make-config</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>maketld</id>
+ <configuration>
+ <xmlFile>META-INF/components.tld</xmlFile>
+ <templateFile>tomahawk.vm</templateFile>
+ <params>
+ <shortname>mc</shortname>
+ <uri>http://myfaces.apache.org/commons/components</uri>
+ <displayname>Myfaces Commons Components Tag Library 1.1.</displayname>
+ <description>MyFaces subproject that contains non rendering components to be used with any JSF implementation.</description>
+ </params>
+ </configuration>
+ <goals>
+ <goal>make-config</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>makemcctaglib</id>
+ <configuration>
+ <xmlFile>META-INF/components.taglib.xml</xmlFile>
+ <xmlBaseFile>src/main/conf/META-INF/facelets-taglib-base.xml</xmlBaseFile>
+ <templateFile>facelets-taglib.vm</templateFile>
+ <params>
+ <shortname>mc</shortname>
+ <uri>http://myfaces.apache.org/commons/components</uri>
+ </params>
+ </configuration>
+ <goals>
+ <goal>make-config</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.myfaces.commons</groupId>
+ <artifactId>myfaces-commons-utils11</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.myfaces.commons</groupId>
+ <artifactId>myfaces-commons-utils11</artifactId>
+ <classifier>tests</classifier>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.shale</groupId>
+ <artifactId>shale-test</artifactId>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.myfaces</groupId>
+ <artifactId>myfaces-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.myfaces</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>myfaces</groupId>
+ <artifactId>myfaces-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>myfaces</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>cactus</groupId>
+ <artifactId>cactus</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>easymock</groupId>
+ <artifactId>easymock</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>easymock</groupId>
+ <artifactId>easymockclassextension</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>maven-taglib</groupId>
+ <artifactId>maven-taglib-plugin</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.4</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <version>2.1</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.4.3</version>
+ </plugin>
+ </plugins>
+ </reporting>
+
+ <profiles>
+ <profile>
+ <id>generate-site</id>
+ <build>
+ <plugins>
+ <plugin>
+ <!-- Generate content for custom tagdoc report -->
+ <groupId>org.apache.myfaces.buildtools</groupId>
+ <artifactId>myfaces-builder-plugin</artifactId>
+ <version>1.0.2</version>
+ <configuration>
+ <taglibs>
+ <mcc>http://myfaces.apache.org/commons/components</mcc>
+ </taglibs>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>tagdoc-content</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>net.sourceforge.maven-taglib</groupId>
+ <artifactId>maven-taglib-plugin</artifactId>
+ <configuration>
+ <taglib.src.dir>${project.build.directory}/myfaces-builder-plugin/main/resources/META-INF</taglib.src.dir>
+ <tldDocDir>${project.build.directory}/site/tlddoc</tldDocDir>
+ </configuration>
+ </plugin>
+ <plugin>
+ <!-- which goal is run here? -->
+ <groupId>org.apache.myfaces.buildtools</groupId>
+ <artifactId>myfaces-builder-plugin</artifactId>
+ <version>1.0.2</version>
+ <configuration>
+ <taglibs>
+ <mcc>http://myfaces.apache.org/commons/components</mcc>
+ </taglibs>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+ </profile>
+ <profile>
+ <!--
+ - Build and install into the repository some additional artifacts that we don't
+ - want to build during normal development because they take too long.
+ -->
+ <id>generate-assembly</id>
+ <activation>
+ <property>
+ <name>performRelease</name>
+ <value>true</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <!-- Install in the repository a "-javadoc.jar" file -->
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.4</version>
+ <executions>
+ <execution>
+ <id>attach-javadoc</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <!-- Install in the repository a "-tlddoc.jar" file -->
+ <groupId>net.sourceforge.maven-taglib</groupId>
+ <artifactId>maven-taglib-plugin</artifactId>
+ <configuration>
+ <taglib.src.dir>${project.build.directory}/myfaces-builder-plugin/main/resources/META-INF</taglib.src.dir>
+ <tldDocDir>${basedir}/target/tlddoc</tldDocDir>
+ </configuration>
+ <executions>
+ <execution>
+ <id>attach-javadoc</id>
+ <goals>
+ <goal>taglibdocjar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <!-- Install in the repository a "-sources.jar" file -->
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-source</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
Propchange: myfaces/commons/branches/jsf_11/myfaces-commons-components/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/commons/branches/jsf_11/myfaces-commons-components/pom.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/renderOne/AbstractUIRenderOne.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/renderOne/AbstractUIRenderOne.java?rev=719822&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/renderOne/AbstractUIRenderOne.java (added)
+++ myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/renderOne/AbstractUIRenderOne.java Fri Nov 21 23:28:00 2008
@@ -0,0 +1,201 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.commons.renderOne;
+
+import java.io.IOException;
+import java.util.Iterator;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+
+/**
+ * Tag that allows rendering the first child either by index or the first
+ * rendered one.
+ * <p>
+ * A component that only renders the first child either by index or the first
+ * visible one..
+ * </p>
+ * @JSFComponent name = "mc:renderOne"
+ * clazz = "org.apache.myfaces.commons.renderOne.UIRenderOne"
+ * tagClass = "org.apache.myfaces.commons.renderOne.UIRenderOneTag"
+ * @author Andrew Robinson (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+public abstract class AbstractUIRenderOne extends UIComponentBase
+{
+ public static final String COMPONENT_FAMILY = "javax.faces.Data";
+ public static final String COMPONENT_TYPE = "org.apache.myfaces.commons.UILimitRendered";
+ private static final String RENDERONE_TYPE_FIRST = "first";
+ private static final String RENDERONE_TYPE_INDEX = "index";
+ private static final Integer FIRST_ITEM_INDEX = new Integer("0");
+
+ /**
+ * The filter type: first|index. first: the first list value should evaluate to a Number
+ * or a value that can be parsed into an integer. index: A collection,
+ * array or comma-separated list of numbers. (Default: "first")
+ *
+ * @JSFProperty
+ * @return the type
+ */
+ public abstract String getType();
+
+ /**
+ * @param type the type to set
+ */
+ public abstract void setType(String type);
+
+ /**
+ * The value valid for the type. If this evaluates to null, the first child will
+ * be rendered.
+ * If the type is "first", this value will be ignored, as "first" always
+ * renders the first rendered item.
+ * If the type is "index", the value must be a number.
+ *
+ * @JSFProperty
+ * @return the value
+ */
+ public abstract Integer getValue();
+
+ /**
+ * @param value the value to set
+ */
+ public abstract void setValue(Integer value);
+
+ /**
+ * @see javax.faces.component.UIComponentBase#getRendersChildren()
+ */
+ public boolean getRendersChildren()
+ {
+ return true;
+ }
+
+ /**
+ * @see javax.faces.component.UIComponentBase#encodeChildren(javax.faces.context.FacesContext)
+ */
+ public void encodeChildren(FacesContext context) throws IOException
+ {
+ if (!isRendered())
+ {
+ return;
+ }
+
+ renderChild(context, (UIComponent) selectOneChild());
+ }
+
+ /**
+ * TODO:Copied from shared_tomahawk.renderkit.RendererUtils
+ * It could be good to move it to myfaces commons utils
+ */
+ private static void renderChild(FacesContext facesContext, UIComponent child)
+ throws IOException
+ {
+ if (!child.isRendered())
+ {
+ return;
+ }
+
+ child.encodeBegin(facesContext);
+ if (child.getRendersChildren())
+ {
+ child.encodeChildren(facesContext);
+ }
+ else
+ {
+ renderChildren(facesContext, child);
+ }
+ child.encodeEnd(facesContext);
+ }
+
+ /**
+ * TODO:Copied from shared_tomahawk.renderkit.RendererUtils
+ * It could be good to move it to myfaces commons utils
+ */
+ private static void renderChildren(FacesContext facesContext,
+ UIComponent component) throws IOException
+ {
+ if (component.getChildCount() > 0)
+ {
+ for (Iterator it = component.getChildren().iterator(); it.hasNext();)
+ {
+ UIComponent child = (UIComponent) it.next();
+ renderChild(facesContext, child);
+ }
+ }
+ }
+
+ protected Object selectOneChild()
+ {
+
+ Integer value = getValue();
+ String type = getType();
+
+ // default is render by count.
+ if (type == null)
+ {
+ type = RENDERONE_TYPE_FIRST;
+ }
+
+ // render by index case.
+ if (RENDERONE_TYPE_INDEX.equals(type))
+ {
+
+ // if value by index is not specified then the first element will be
+ // rendered only.
+ if (value == null)
+ {
+ value = FIRST_ITEM_INDEX;
+ }
+
+ // select the child by index.
+ return selectFirstChildByIndex(value);
+ }
+
+ // render by count case.
+ if (RENDERONE_TYPE_FIRST.equals(type))
+ {
+
+ // select the first child that has rendered="true".
+ return selectFirstChildOnly();
+ }
+ else
+ {
+ throw new IllegalArgumentException("type");
+ }
+ }
+
+ protected Object selectFirstChildOnly()
+ {
+ for (Iterator iter = getChildren().iterator(); iter.hasNext();)
+ {
+ UIComponent child = (UIComponent) iter.next();
+ if (child.isRendered())
+ {
+ return child;
+ }
+ }
+
+ return null;
+ }
+
+ protected Object selectFirstChildByIndex(Integer value)
+ {
+ return getChildren().get(value.intValue());
+ }
+}
Propchange: myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/renderOne/AbstractUIRenderOne.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/renderOne/AbstractUIRenderOne.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/componentClass11.vm
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/componentClass11.vm?rev=719822&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/componentClass11.vm (added)
+++ myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/componentClass11.vm Fri Nov 21 23:28:00 2008
@@ -0,0 +1,266 @@
+## Velocity template used to generate JSF1.1-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.faces.component.UIComponent;
+import javax.faces.el.ValueBinding;
+import javax.faces.context.FacesContext;
+$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;
+ }
+
+#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.isLiteralOnly() || $property.isTagExcluded() )
+ private $type $field #if($defaultValue) = $defaultValue;#{else};#{end}
+
+
+#else
+ private $type $field;
+
+#end
+#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;
+ }
+ ValueBinding vb = getValueBinding("$property.name");
+ if (vb != null)
+ {
+#if ($utils.isPrimitiveClass($type))
+ return ($utils.castIfNecessary($type) vb.getValue(getFacesContext())).${type}Value();
+#else
+#set ($pritype = $utils.getPrimitiveType($property.className))
+#if ($utils.isPrimitiveClass($pritype))
+ Object value = vb == null ? null : vb.getValue(getFacesContext());
+ if (!(value instanceof $type)){
+ value = ${type}.valueOf(value.toString());
+ }
+ return $utils.castIfNecessary($type) value;
+#elseif ($type == "String")
+## MYFACES-2006 use toString(), so Numeric ValueBinding could be converted as
+## Strings and do not cause ClassCastException
+## (only applies for JSF 1.1 due to backward compatibility)
+ return $utils.castIfNecessary($type) vb.getValue(getFacesContext()).toString();
+#else
+ return $utils.castIfNecessary($type) vb.getValue(getFacesContext());
+#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 ($utils.isPrimitiveClass($type) && !$property.isTagExcluded()
+ && !$property.isLiteralOnly())
+ this.${field}Set = true;
+#end
+ }
+#end
+
+ public Object saveState(FacesContext facesContext)
+ {
+#set ($primitiveCount = $propertyList.size() + 1)
+#foreach( $property in $propertyList )
+#if($utils.isPrimitiveClass($property.className) &&
+ !$property.isLiteralOnly())
+#set ($primitiveCount = $primitiveCount + 1)
+#end
+#end
+ Object[] values = new Object[$primitiveCount];
+ values[0] = super.saveState(facesContext);
+#set ($arrayIndex = 0)
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $property.className)
+#set ($arrayIndex = $arrayIndex + 1)
+#if ($property.jspName == "validator" && $property.isMethodBinding() )
+ values[$arrayIndex] = saveAttachedState(facesContext,${field}List);
+#elseif ( $property.isStateHolder() )## || $utils.isConverter($type)
+ values[$arrayIndex] = saveAttachedState(facesContext,$field);
+#elseif($utils.isPrimitiveClass($type))
+#if ($type == "boolean")
+ values[$arrayIndex] = ${utils.getBoxedClass($type)}.valueOf($field);
+#else
+ values[$arrayIndex] = new ${utils.getBoxedClass($type)}($field);
+#end
+#else
+ values[$arrayIndex] = $field;
+#end
+#if($utils.isPrimitiveClass($type) && !$property.isTagExcluded()
+ && !$property.isLiteralOnly() )
+#set ($arrayIndex = $arrayIndex + 1)
+ values[$arrayIndex] = Boolean.valueOf(${field}Set);
+#end
+#end
+ return values;
+ }
+
+ public void restoreState(FacesContext facesContext, Object state)
+ {
+ Object[] values = (Object[])state;
+ super.restoreState(facesContext,values[0]);
+#set ($arrayIndex = 0)
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $property.className)
+#set ($arrayIndex = $arrayIndex + 1)
+#if ( $property.isStateHolder() )
+#if ($property.jspName == "validator" && $property.isMethodBinding() )
+ ${field}List = (List<Validator>) restoreAttachedState(facesContext,values[$arrayIndex]);
+#elseif ($utils.isList($type))
+ $field = (List) restoreAttachedState(facesContext,values[$arrayIndex]);
+#else
+ $field = $utils.castIfNecessary($type) restoreAttachedState(facesContext,values[$arrayIndex]);
+#end
+#elseif ($utils.isConverter($type))
+ $field = (Converter) restoreAttachedState(facesContext,values[$arrayIndex]);
+#elseif ($utils.isPrimitiveClass($type))
+ $field = ($utils.castIfNecessary($type) values[$arrayIndex]).${type}Value();
+#else
+ $field = $utils.castIfNecessary($type) values[$arrayIndex];
+#end
+#if($utils.isPrimitiveClass($type) && !$property.isTagExcluded()
+ && !$property.isLiteralOnly() )
+#set ($arrayIndex = $arrayIndex + 1)
+ ${field}Set = ((Boolean) values[$arrayIndex]).booleanValue();
+#end
+#end
+ }
+}
Added: myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/facelets-taglib.vm
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/facelets-taglib.vm?rev=719822&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/facelets-taglib.vm (added)
+++ myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/facelets-taglib.vm Fri Nov 21 23:28:00 2008
@@ -0,0 +1,95 @@
+<?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.
+-->
+<!DOCTYPE facelet-taglib
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN" "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
+<facelet-taglib xmlns="http://java.sun.com/JSF/Facelet">
+
+ <namespace>$uri</namespace>
+
+ <!-- Component Tags -->
+#set ($componentList = ${model.getComponents()})
+#foreach( $component in $componentList )
+#if ($modelIds.contains($component.modelId)
+ && ($component.name))
+#if (!$component.isConfigExcluded())
+ <tag>
+ <tag-name>$utils.getTagName($component.name)</tag-name>
+ <component>
+ <component-type>$component.type</component-type>
+#if ($component.rendererType)
+#if (!($component.rendererType == ""))
+ <renderer-type>$component.rendererType</renderer-type>
+#end
+#end
+#if ($component.tagHandler)
+ <handler-class>$component.tagHandler</handler-class>
+#end
+ </component>
+ </tag>
+#end
+#end
+#end
+
+ <!-- Converter tags -->
+#set ($componentList = ${model.getConverters()})
+#foreach( $component in $componentList )
+#if ($modelIds.contains($component.modelId)
+ && ($component.name))
+#if ($component.converterId)
+ <tag>
+ <tag-name>$utils.getTagName($component.name)</tag-name>
+ <converter>
+ <converter-id>$component.converterId</converter-id>
+ </converter>
+ </tag>
+#end
+#end
+#end
+
+ <!-- Validator tags -->
+#set ($componentList = ${model.getValidators()})
+#foreach( $component in $componentList )
+#if ($modelIds.contains($component.modelId)
+ && ($component.name))
+#if ($component.validatorId)
+ <tag>
+ <tag-name>$utils.getTagName($component.name)</tag-name>
+ <validator>
+ <validator-id>$component.validatorId</validator-id>
+ </validator>
+ </tag>
+#end
+#end
+#end
+
+ <!-- Single Tags -->
+#set ($tagList = $model.getTags())
+#foreach( $tag in $tagList )
+#if ($modelIds.contains($tag.modelId))
+#if ($tag.tagHandler)
+ <tag>
+ <tag-name>$utils.getTagName($tag.name)</tag-name>
+ <handler-class>$tag.tagHandler</handler-class>
+ </tag>
+#end
+#end
+#end
+
+</facelet-taglib>
\ No newline at end of file
Added: myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/faces-config11.vm
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/faces-config11.vm?rev=719822&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/faces-config11.vm (added)
+++ myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/faces-config11.vm Fri Nov 21 23:28:00 2008
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!DOCTYPE faces-config PUBLIC
+ "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+
+<!--
+ * 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.
+-->
+
+<faces-config xmlns="http://java.sun.com/JSF/Configuration">
+
+$baseContent
+
+#set ($componentList = ${model.getComponents()})
+#foreach( $component in $componentList )
+#if ($modelIds.contains($component.modelId)
+ && !($component.className.contains("UIComponent"))
+ && !($component.isConfigExcluded()))
+ <component>
+ <component-type>$component.type</component-type>
+ <component-class>$component.className</component-class>
+ </component>
+#end
+#end
+#set ($converterList = ${model.getConverters()})
+#foreach( $converter in $converterList )
+#if ($modelIds.contains($converter.modelId))
+ <converter>
+ <converter-id>$converter.converterId</converter-id>
+ <converter-class>$converter.className</converter-class>
+ </converter>
+#end
+#end
+#set ($validatorList = ${model.getValidators()})
+#foreach( $validator in $validatorList )
+#if ($modelIds.contains($validator.modelId) &&
+ !($validator.isConfigExcluded().booleanValue()) &&
+ $validator.validatorId)
+ <validator>
+ <validator-id>$validator.validatorId</validator-id>
+ <validator-class>$validator.className</validator-class>
+ </validator>
+#end
+#end
+#set ($renderKitList = ${model.getRenderKits()})
+#foreach( $renderKit in $renderKitList )
+ <render-kit>
+ <render-kit-id>$renderKit.renderKitId</render-kit-id>
+#if ($renderKit.className)
+ <render-kit-class>$renderKit.className</render-kit-class>
+#end
+#set ($rendererList = ${renderKit.getRenderers()})
+#foreach( $renderer in $rendererList )
+ <renderer>
+ <component-family>$renderer.componentFamily</component-family>
+ <renderer-type>$renderer.rendererType</renderer-type>
+ <renderer-class>$renderer.className</renderer-class>
+ </renderer>
+#end
+ </render-kit>
+#end
+</faces-config>
\ No newline at end of file
Added: myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/tagClass11.vm
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/tagClass11.vm?rev=719822&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/tagClass11.vm (added)
+++ myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/tagClass11.vm Fri Nov 21 23:28:00 2008
@@ -0,0 +1,174 @@
+// WARNING: This file was automatically generated. Do not edit it directly,
+// or you will lose your changes.
+/*
+ * 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.tagPackage};
+
+import javax.faces.component.UIComponent;
+import javax.faces.el.ValueBinding;
+import javax.faces.context.FacesContext;
+$utils.importTagClasses($component)
+
+// 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.tagClass)
+#if (${component.tagSuperclass})
+ extends ${component.tagSuperclass}
+#else
+ extends javax.faces.webapp.UIComponentTag
+#end
+{
+ public $utils.getClassFromFullClass($component.tagClass)()
+ {
+ }
+
+ public String getComponentType()
+ {
+#if ($component.type)
+ return "$component.type";
+#else
+ return null;
+#end
+ }
+
+ public String getRendererType()
+ {
+#if ($component.rendererType && !($component.rendererType == ""))
+ return "$component.rendererType";
+#else
+ return null;
+#end
+ }
+
+#set ($propertyList = ${component.propertyTagList})
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $utils.getJspPropertyType11($property))
+
+ private $type $field;
+
+#set ($var = $utils.getVariableFromName($property.name))
+ public void $utils.getPrefixedPropertyName("set", $property.jspName)($type $var)
+ {
+ $field = $var;
+ }
+#end
+
+ protected void setProperties(UIComponent component)
+ {
+ if (!(component instanceof $component.className))
+ {
+ throw new IllegalArgumentException("Component "+
+ component.getClass().getName() +" is no $component.className");
+ }
+
+ $component.className comp = ($component.className) component;
+
+ super.setProperties(component);
+
+ FacesContext context = getFacesContext();
+
+#foreach( $property in $propertyList )## 1
+#set ($field = $property.fieldName)
+#set ($type = $utils.getJspPropertyType11($property))
+#if ($utils.isConverter($property.className))## 2
+ if ($field != null)
+ {
+ if (isValueReference($field))
+ {
+ ValueBinding vb = context.getApplication().createValueBinding($field);
+ comp.setValueBinding("$property.name", vb);
+ }
+ else
+ {
+ Converter converter = getFacesContext().getApplication().createConverter($field);
+ comp.setConverter(converter);
+ }
+ }
+#elseif ($property.isMethodBinding())## 2
+ if ($field != null)
+ {
+#if ($utils.isStringMethodBindingReturnType($property.methodBindingSignature))##3
+ MethodBinding mb;
+ if (isValueReference($field))
+ {
+ mb = context.getApplication().createMethodBinding(
+ $field, $utils.getSignatureParams($property.methodBindingSignature));
+ }
+ else
+ {
+#if ($property.jspName == "action")## 4
+ mb = new org.apache.myfaces.shared_tomahawk.el.SimpleActionMethodBinding($field);
+#else## 4
+ throw new IllegalStateException("Invalid expression " + $field);
+#end## 4
+ }
+#else## 3
+ MethodBinding mb = context.getApplication().createMethodBinding(
+ $field, $utils.getSignatureParams($property.methodBindingSignature));
+#end## 3
+ comp.${utils.getPrefixedPropertyName("set",$property.name)}(mb);
+ }
+#else## 2
+ if ($field != null)
+ {
+#if ($property.isLiteralOnly())## 3
+#set ($className = $utils.getPrimitiveType($property.className))
+#if ($utils.isPrimitiveClass($className))## 4
+ comp.getAttributes().put("$property.name", ${utils.getBoxedClass($className)}.valueOf($field));
+#else## 4
+ comp.getAttributes().put("$property.name", $field);
+#end## 4
+#else## 3
+ if (isValueReference($field))
+ {
+ ValueBinding vb = context.getApplication().createValueBinding($field);
+ comp.setValueBinding("$property.name", vb);
+ }
+ else
+ {
+#set ($className = $utils.getPrimitiveType($property.className))
+#if ($utils.isPrimitiveClass($className))## 4
+ comp.getAttributes().put("$property.name", ${utils.getBoxedClass($className)}.valueOf($field));
+#else## 4
+ comp.getAttributes().put("$property.name", $field);
+#end## 4
+ }
+#end## 3
+ }
+#end## 2
+#end## 1
+ }
+
+ public void release()
+ {
+ super.release();
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#if($utils.getJspPropertyType11($property) == "boolean")
+#set ($empty = "false")
+#else
+#set ($empty = "null")
+#end
+ $field = $empty;
+#end
+ }
+}
\ No newline at end of file
Added: myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/tomahawk.vm
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/tomahawk.vm?rev=719822&view=auto
==============================================================================
--- myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/tomahawk.vm (added)
+++ myfaces/commons/branches/jsf_11/myfaces-commons-components/src/main/resources/META-INF/tomahawk.vm Fri Nov 21 23:28:00 2008
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ * 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.
+-->
+<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+ <tlib-version>1.0</tlib-version>
+ <jsp-version>1.2</jsp-version>
+ <short-name>$shortname</short-name>
+ <uri>$uri</uri>
+ <display-name>$displayname</display-name>
+ <description>$description</description>
+
+$baseContent
+
+ <!-- Component Tags -->
+#set ($componentList = ${model.getComponents()})
+#foreach( $component in $componentList )
+#if ($modelIds.contains($component.modelId)
+ && ($component.name))
+#if ($utils.getTagPrefix($component.name) == $shortname)
+ <tag>
+ <name>$utils.getTagName($component.name)</name>
+ <tag-class>$component.tagClass</tag-class>
+#if ($component.bodyContent)
+ <body-content>$component.bodyContent</body-content>
+#else
+ <body-content>JSP</body-content>
+#end
+ <description><![CDATA[$component.longDescription]]></description>
+
+#set ($propertyList = ${component.propertyList})
+#foreach( $property in $propertyList )
+#if (!$property.isTagExcluded())
+ <attribute>
+ <name>$property.jspName</name>
+ <required>$property.isRequired()</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.String</type>
+#if ($property.longDescription)
+ <description><![CDATA[$property.longDescription]]></description>
+#else
+ <description><![CDATA[]]></description>
+#end
+ </attribute>
+#end
+#end
+ </tag>
+#end
+#end
+#end
+ <!-- Converter tags -->
+#set ($componentList = ${model.getConverters()})
+#foreach( $component in $componentList )
+#if ($modelIds.contains($component.modelId)
+ && ($component.name))
+#if ($utils.getTagPrefix($component.name) == $shortname)
+ <tag>
+ <name>$utils.getTagName($component.name)</name>
+ <tag-class>$component.tagClass</tag-class>
+#if ($component.bodyContent)
+ <body-content>$component.bodyContent</body-content>
+#else
+ <body-content>empty</body-content>
+#end
+ <description><![CDATA[$component.longDescription]]></description>
+
+#set ($propertyList = ${component.propertyList})
+#foreach( $property in $propertyList )
+#if (!$property.isTagExcluded())
+ <attribute>
+ <name>$property.name</name>
+ <required>$property.isRequired()</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.String</type>
+#if ($property.longDescription)
+ <description><![CDATA[$property.longDescription]]></description>
+#else
+ <description><![CDATA[]]></description>
+#end
+ </attribute>
+#end
+#end
+ </tag>
+#end
+#end
+#end
+ <!-- Validator tags -->
+#set ($componentList = ${model.getValidators()})
+#foreach( $component in $componentList )
+#if ($modelIds.contains($component.modelId)
+ && ($component.name))
+#if ($utils.getTagPrefix($component.name) == $shortname)
+ <tag>
+ <name>$utils.getTagName($component.name)</name>
+ <tag-class>$component.tagClass</tag-class>
+#if ($component.bodyContent)
+ <body-content>$component.bodyContent</body-content>
+#else
+ <body-content>empty</body-content>
+#end
+ <description><![CDATA[$component.longDescription]]></description>
+
+#set ($propertyList = ${component.propertyList})
+#foreach( $property in $propertyList )
+#if (!$property.isTagExcluded())
+ <attribute>
+ <name>$property.name</name>
+ <required>$property.isRequired()</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.String</type>
+#if ($property.longDescription)
+ <description><![CDATA[$property.longDescription]]></description>
+#else
+ <description><![CDATA[]]></description>
+#end
+ </attribute>
+#end
+#end
+ </tag>
+#end
+#end
+#end
+ <!-- Single Tags -->
+#set ($tagList = $model.getTags())
+#foreach( $tag in $tagList )
+#if ($modelIds.contains($tag.modelId))
+ <tag>
+ <name>$utils.getTagName($tag.name)</name>
+ <tag-class>$tag.className</tag-class>
+ <body-content>$tag.bodyContent</body-content>
+ <description><![CDATA[$tag.longDescription]]></description>
+#set ($attributeList = ${tag.attributeList})
+#foreach( $attribute in $attributeList )
+ <attribute>
+ <name>$attribute.name</name>
+ <required>$attribute.isRequired()</required>
+ <rtexprvalue>$attribute.isRtexprvalue()</rtexprvalue>
+#if ($attribute.className)
+ <type>$attribute.className</type>
+#else
+ <type>java.lang.String</type>
+#end
+#if ($property.longDescription)
+ <description><![CDATA[$property.longDescription]]></description>
+#else
+ <description><![CDATA[]]></description>
+#end
+ </attribute>
+#end
+ </tag>
+#end
+#end
+</taglib>
\ No newline at end of file
Modified: myfaces/commons/branches/jsf_11/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_11/pom.xml?rev=719822&r1=719821&r2=719822&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_11/pom.xml (original)
+++ myfaces/commons/branches/jsf_11/pom.xml Fri Nov 21 23:28:00 2008
@@ -1,342 +1,343 @@
-<?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">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.myfaces</groupId>
- <artifactId>myfaces</artifactId>
- <version>6</version>
- </parent>
-
- <groupId>org.apache.myfaces.commons</groupId>
- <artifactId>commons11</artifactId>
- <version>1.0.1-SNAPSHOT</version>
- <packaging>pom</packaging>
- <name>Apache MyFaces Commons</name>
- <url>http://myfaces.apache.org/commons11</url>
- <inceptionYear>2007</inceptionYear>
-
- <!--issueManagement>
- <system>jira</system>
- <url>http://issues.apache.org/jira/browse/MYFACES-COMMONS</url>
- </issueManagement-->
-
- <distributionManagement>
- <site>
- <id>apache-site</id>
- <name>Apache Website</name>
- <url>scpexe://people.apache.org/www/myfaces.apache.org/commons11/</url>
- </site>
- </distributionManagement>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-remote-resources-plugin</artifactId>
- <version>1.0-alpha-6</version>
- <executions>
- <execution>
- <goals>
- <goal>process</goal>
- </goals>
- <configuration>
- <resourceBundles>
- <resourceBundle>org.apache:apache-jar-resource-bundle:1.1</resourceBundle>
- </resourceBundles>
- <properties>
- <addLicense>true</addLicense>
- </properties>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <!--
- - Make a checkstyle violation a compile error. Note that if a compile error occurs,
- - further information can be found in target/site/checkstyle.html (present even when
- - just the compile goal and not the site goal has been run). Note also that child
- - projects may redeclare this plugin and provide different configuration settings
- - to use different checks (more or less strict than the default).
- -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.2</version>
- <executions>
- <execution>
- <id>verify-style</id>
- <phase>process-sources</phase>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <configLocation>default/myfaces-checks-minimal.xml</configLocation>
- <headerLocation>default/myfaces-header.txt</headerLocation>
- </configuration>
- </plugin>
- </plugins>
-
- <pluginManagement>
- <plugins>
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.1</version>
- <configuration>
- <archive>
- <manifest>
- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.4</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.0.4</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>commons-beanutils</groupId>
- <artifactId>commons-beanutils</artifactId>
- <version>1.7.0</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.myfaces.core</groupId>
- <artifactId>myfaces-api</artifactId>
- <version>1.1.6</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.myfaces.core</groupId>
- <artifactId>myfaces-impl</artifactId>
-
- <version>1.1.6</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.shale</groupId>
- <artifactId>shale-test</artifactId>
- <version>1.0.3</version>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.myfaces</groupId>
- <artifactId>myfaces-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.myfaces</groupId>
- <artifactId>myfaces-impl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>myfaces</groupId>
- <artifactId>myfaces-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>myfaces</groupId>
- <artifactId>myfaces-impl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>joda-time</groupId>
- <artifactId>joda-time</artifactId>
- <version>1.5.1</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>cactus</groupId>
- <artifactId>cactus</artifactId>
- <version>13-1.7.1</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>aspectj</groupId>
- <artifactId>aspectjrt</artifactId>
- <version>1.2.1</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>easymock</groupId>
- <artifactId>easymock</artifactId>
- <version>1.1</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>easymock</groupId>
- <artifactId>easymockclassextension</artifactId>
- <version>1.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>jmock</groupId>
- <artifactId>jmock</artifactId>
- <version>1.0.1</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>jmock</groupId>
- <artifactId>jmock-cglib</artifactId>
- <version>1.0.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>maven-taglib</groupId>
- <artifactId>maven-taglib-plugin</artifactId>
- <version>1.4.2</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/commons/trunk/</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/commons/trunk/</developerConnection>
- <url>http://svn.apache.org/viewvc/myfaces/commons/trunk</url>
- </scm>
-
- <modules>
- <module>myfaces-commons-validators</module>
- <module>myfaces-commons-converters</module>
- <module>myfaces-commons-utils</module>
- <module>myfaces-commons-examples</module>
- </modules>
-
- <profiles>
- <!-- This profile is invoked by -DprepareRelease=true. This allows mvn release:prepare to
- run successfully on the assembly projects. -->
- <profile>
- <id>prepare-release</id>
- <activation>
- <property>
- <name>prepareRelease</name>
- </property>
- </activation>
- <modules>
- <module>myfaces-commons-assembly</module>
- </modules>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-release-plugin</artifactId>
- <configuration>
- <arguments>-DprepareRelease</arguments>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <profile>
- <id>perform-release</id>
- <activation>
- <property>
- <name>performRelease</name>
- <value>true</value>
- </property>
- </activation>
- <modules>
- <module>myfaces-commons-assembly</module>
- </modules>
- </profile>
- <profile>
- <id>generate-assembly</id>
- <activation>
- <property>
- <name>performRelease</name>
- <value>true</value>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.2</version>
- <executions>
- <execution>
- <id>attach-javadocs</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>all-modules</id>
- <modules>
- <module>myfaces-async-lifecycle</module>
- <module>myfaces-commons-site</module>
- </modules>
- </profile>
- </profiles>
-
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <configLocation>default/myfaces-checks-standard.xml</configLocation>
- <headerLocation>default/myfaces-header-spaces.txt</headerLocation>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-pmd-plugin</artifactId>
- <configuration>
- <targetJdk>1.5</targetJdk>
- </configuration>
- </plugin>
- </plugins>
- </reporting>
-</project>
+<?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">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.myfaces</groupId>
+ <artifactId>myfaces</artifactId>
+ <version>6</version>
+ </parent>
+
+ <groupId>org.apache.myfaces.commons</groupId>
+ <artifactId>commons11</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>Apache MyFaces Commons</name>
+ <url>http://myfaces.apache.org/commons11</url>
+ <inceptionYear>2007</inceptionYear>
+
+ <!--issueManagement>
+ <system>jira</system>
+ <url>http://issues.apache.org/jira/browse/MYFACES-COMMONS</url>
+ </issueManagement-->
+
+ <distributionManagement>
+ <site>
+ <id>apache-site</id>
+ <name>Apache Website</name>
+ <url>scpexe://people.apache.org/www/myfaces.apache.org/commons11/</url>
+ </site>
+ </distributionManagement>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-remote-resources-plugin</artifactId>
+ <version>1.0-alpha-6</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>process</goal>
+ </goals>
+ <configuration>
+ <resourceBundles>
+ <resourceBundle>org.apache:apache-jar-resource-bundle:1.1</resourceBundle>
+ </resourceBundles>
+ <properties>
+ <addLicense>true</addLicense>
+ </properties>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <!--
+ - Make a checkstyle violation a compile error. Note that if a compile error occurs,
+ - further information can be found in target/site/checkstyle.html (present even when
+ - just the compile goal and not the site goal has been run). Note also that child
+ - projects may redeclare this plugin and provide different configuration settings
+ - to use different checks (more or less strict than the default).
+ -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.2</version>
+ <executions>
+ <execution>
+ <id>verify-style</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <configLocation>default/myfaces-checks-minimal.xml</configLocation>
+ <headerLocation>default/myfaces-header.txt</headerLocation>
+ </configuration>
+ </plugin>
+ </plugins>
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.4</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.0.4</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ <version>1.7.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <version>1.1.6</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-impl</artifactId>
+
+ <version>1.1.6</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shale</groupId>
+ <artifactId>shale-test</artifactId>
+ <version>1.0.3</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.myfaces</groupId>
+ <artifactId>myfaces-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.myfaces</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>myfaces</groupId>
+ <artifactId>myfaces-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>myfaces</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ <version>1.5.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>cactus</groupId>
+ <artifactId>cactus</artifactId>
+ <version>13-1.7.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ <version>1.2.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>easymock</groupId>
+ <artifactId>easymock</artifactId>
+ <version>1.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>easymock</groupId>
+ <artifactId>easymockclassextension</artifactId>
+ <version>1.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jmock</groupId>
+ <artifactId>jmock</artifactId>
+ <version>1.0.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>jmock</groupId>
+ <artifactId>jmock-cglib</artifactId>
+ <version>1.0.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>maven-taglib</groupId>
+ <artifactId>maven-taglib-plugin</artifactId>
+ <version>1.4.2</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/commons/trunk/</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/commons/trunk/</developerConnection>
+ <url>http://svn.apache.org/viewvc/myfaces/commons/trunk</url>
+ </scm>
+
+ <modules>
+ <module>myfaces-commons-utils</module>
+ <module>myfaces-commons-components</module>
+ <module>myfaces-commons-validators</module>
+ <module>myfaces-commons-converters</module>
+ <module>myfaces-commons-examples</module>
+ </modules>
+
+ <profiles>
+ <!-- This profile is invoked by -DprepareRelease=true. This allows mvn release:prepare to
+ run successfully on the assembly projects. -->
+ <profile>
+ <id>prepare-release</id>
+ <activation>
+ <property>
+ <name>prepareRelease</name>
+ </property>
+ </activation>
+ <modules>
+ <module>myfaces-commons-assembly</module>
+ </modules>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-release-plugin</artifactId>
+ <configuration>
+ <arguments>-DprepareRelease</arguments>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>perform-release</id>
+ <activation>
+ <property>
+ <name>performRelease</name>
+ <value>true</value>
+ </property>
+ </activation>
+ <modules>
+ <module>myfaces-commons-assembly</module>
+ </modules>
+ </profile>
+ <profile>
+ <id>generate-assembly</id>
+ <activation>
+ <property>
+ <name>performRelease</name>
+ <value>true</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.2</version>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>all-modules</id>
+ <modules>
+ <module>myfaces-async-lifecycle</module>
+ <module>myfaces-commons-site</module>
+ </modules>
+ </profile>
+ </profiles>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <configLocation>default/myfaces-checks-standard.xml</configLocation>
+ <headerLocation>default/myfaces-header-spaces.txt</headerLocation>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <configuration>
+ <targetJdk>1.5</targetJdk>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>