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/06/07 23:59:04 UTC

svn commit: r664402 [1/4] - in /myfaces/tomahawk/trunk/core12: ./ src/ src/main/ src/main/conf/ src/main/conf/META-INF/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/myfaces/ src/main/java/org/apache/myfaces/compo...

Author: lu4242
Date: Sat Jun  7 14:59:02 2008
New Revision: 664402

URL: http://svn.apache.org/viewvc?rev=664402&view=rev
Log:
add core12 according to vote

Added:
    myfaces/tomahawk/trunk/core12/   (with props)
    myfaces/tomahawk/trunk/core12/pom.xml   (with props)
    myfaces/tomahawk/trunk/core12/src/
    myfaces/tomahawk/trunk/core12/src/main/
    myfaces/tomahawk/trunk/core12/src/main/conf/
    myfaces/tomahawk/trunk/core12/src/main/conf/META-INF/
    myfaces/tomahawk/trunk/core12/src/main/conf/META-INF/faces-config-base.xml   (with props)
    myfaces/tomahawk/trunk/core12/src/main/conf/META-INF/tomahawk-base.tld   (with props)
    myfaces/tomahawk/trunk/core12/src/main/java/
    myfaces/tomahawk/trunk/core12/src/main/java/org/
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/component/
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/component/MethodBindingToMethodExpression.java   (with props)
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/component/MethodExpressionToMethodBinding.java   (with props)
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/converter/
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/converter/ConverterTag.java   (with props)
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/Alias.java   (with props)
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBean.java   (with props)
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeanTag.java   (with props)
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScope.java   (with props)
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScopeTag.java   (with props)
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/buffer/
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/buffer/AbstractBuffer.java   (with props)
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/navigation/
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/navigation/AbstractHtmlPanelNavigation.java   (with props)
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/navmenu/
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/navmenu/AbstractUINavigationMenuItem.java   (with props)
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/regexprvalidator/
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/regexprvalidator/RegExprValidator.java   (with props)
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/savestate/
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/savestate/UISaveState.java   (with props)
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/schedule/
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/schedule/UISchedule.java   (with props)
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/tabbedpane/
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/tabbedpane/TabChangeListenerTag.java   (with props)
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/tree/
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/tree/taglib/
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/tree/taglib/AbstractTreeTag.java   (with props)
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/updateactionlistener/
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/updateactionlistener/UpdateActionListenerTag.java   (with props)
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/renderkit/
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/renderkit/html/
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/renderkit/html/ext/
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlCheckboxRenderer.java   (with props)
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlRadioRenderer.java   (with props)
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlTableRenderer.java   (with props)
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/validator/
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/validator/ValidatorBase.java   (with props)
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/validator/ValidatorBaseTag.java   (with props)
    myfaces/tomahawk/trunk/core12/src/main/resources/
    myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/
    myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/LICENSE.txt   (with props)
    myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/NOTICE.txt   (with props)
    myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/componentClass12.vm
    myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/faces-config12.vm
    myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/licenses/
    myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/licenses/dojo-LICENSE.TXT
    myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/licenses/i18n-LICENSE.txt   (with props)
    myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/licenses/jscookmenu-LICENSE.txt   (with props)
    myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/licenses/kupu-LICENSE.txt   (with props)
    myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/licenses/prototype-LICENSE.txt   (with props)
    myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/licenses/scriptaculous-LICENSE.txt   (with props)
    myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/tagClass12.vm
    myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/tagConverterClass12.vm
    myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/tagValidatorClass12.vm
    myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/tomahawk12.vm

Propchange: myfaces/tomahawk/trunk/core12/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Jun  7 14:59:02 2008
@@ -0,0 +1,10 @@
+target
+.classpath
+.project
+.wtpmodules
+*.ipr
+*.iml
+*.iws
+.settings
+maven-eclipse.xml
+.externalToolsBuilder

Added: myfaces/tomahawk/trunk/core12/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/pom.xml?rev=664402&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/pom.xml (added)
+++ myfaces/tomahawk/trunk/core12/pom.xml Sat Jun  7 14:59:02 2008
@@ -0,0 +1,729 @@
+<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>
+
+  <groupId>org.apache.myfaces.tomahawk</groupId>
+  <artifactId>tomahawk12</artifactId>
+  <packaging>jar</packaging>
+  <name>Tomahawk 1.2 Core</name>
+
+  <parent>
+    <groupId>org.apache.myfaces.tomahawk</groupId>
+    <artifactId>tomahawk-project</artifactId>
+    <version>1.1.7-SNAPSHOT</version>
+  </parent>
+
+  <scm>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/core12</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/core12</developerConnection>
+    <url>http://svn.apache.org/viewcvs.cgi/myfaces/tomahawk/trunk/trunk/core12</url>
+  </scm>
+
+  <dependencies>
+
+    <!-- compile dependencies -->
+
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <version>1.1.1</version>
+      <scope>compile</scope>
+    </dependency>
+    
+
+    <dependency>
+      <groupId>commons-validator</groupId>
+      <artifactId>commons-validator</artifactId>
+      <version>1.3.1</version>
+      <scope>compile</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-fileupload</groupId>
+      <artifactId>commons-fileupload</artifactId>
+      <version>1.0</version>
+      <scope>compile</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-collections</groupId>
+      <artifactId>commons-collections</artifactId>
+      <version>3.1</version>
+      <scope>compile</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>struts</groupId>
+      <artifactId>struts</artifactId>
+      <version>1.2.9</version>
+      <scope>compile</scope>
+      <optional>true</optional>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.tiles</groupId>
+      <artifactId>tiles-core</artifactId>
+      <version>2.0.5</version>
+      <scope>compile</scope>
+      <optional>true</optional>        
+    </dependency>
+
+    <dependency>
+      <groupId>commons-codec</groupId>
+      <artifactId>commons-codec</artifactId>
+      <version>1.3</version>
+      <scope>compile</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>oro</groupId>
+      <artifactId>oro</artifactId>
+      <version>2.0.8</version>
+      <scope>compile</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-lang</groupId>
+      <artifactId>commons-lang</artifactId>
+      <version>2.1</version>
+      <scope>compile</scope>
+    </dependency>
+
+      <dependency>
+          <groupId>javax.servlet</groupId>
+          <artifactId>jstl</artifactId>
+          <version>1.1.0</version>
+          <scope>compile</scope>
+      </dependency>
+      
+      <!--
+      <dependency>
+          <groupId>org.apache.myfaces.commons</groupId>
+          <artifactId>myfaces-validators</artifactId>
+          <version>0.0.1-SNAPSHOT</version>
+          <scope>runtime</scope>
+      </dependency>      
+      -->
+    <!-- provided dependencies -->
+
+    <dependency>
+      <groupId>org.apache.myfaces.core</groupId>
+      <artifactId>myfaces-api</artifactId>
+      <version>1.2.4-SNAPSHOT</version>
+      <!-- <version>1.1.6-SNAPSHOT</version> -->
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.myfaces.shared</groupId>
+      <artifactId>myfaces-shared-tomahawk</artifactId>
+      <version>3.0.4-SNAPSHOT</version>
+      <!-- <version>2.0.8-SNAPSHOT</version> -->
+      <scope>provided</scope> <!-- because we add all classes to the jar directly -->
+    </dependency>
+        
+    <dependency>
+      <groupId>javax.servlet.jsp</groupId>
+      <artifactId>jsp-api</artifactId>
+      <version>2.1</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <version>2.5</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>portlet-api</groupId>
+      <artifactId>portlet-api</artifactId>
+      <version>1.0</version>
+      <scope>provided</scope>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.myfaces.buildtools</groupId>
+      <artifactId>myfaces-builder-annotations</artifactId> 
+      <version>1.0.1-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+    
+    <!-- test dependencies -->
+
+    <dependency>
+      <groupId>org.apache.myfaces.core</groupId>
+      <artifactId>myfaces-impl</artifactId>
+      <!--
+        Since Tomahawk must stay compatible to other JSF implementations we
+        must not have any (compile time) dependency on myfaces-impl other than
+        test classes.
+      -->
+      <scope>test</scope>
+    </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>org.apache.shale</groupId>
+      <artifactId>shale-test</artifactId>
+      <version>1.0.4</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>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>
+
+  <build>
+
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <excludes>
+           <exclude>**/*.vm</exclude>
+        </excludes>
+      </resource>
+      <!-- 
+      <resource>
+        <directory>src/main/resources-facesconfig</directory>
+      </resource>
+       -->
+      <resource>
+        <directory>target/tomahawk11_resources</directory>
+      </resource>       
+    </resources>
+
+    <plugins>
+      <!-- the following will add the unpacked shared sources directory as source directory into the pom,
+           so also the shared sources are automaticaly included by the attach source plugin -->
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <executions>
+            <execution>
+                <id>add-source</id>
+                <phase>generate-sources</phase>
+                <!-- <phase>process-sources</phase> -->
+                <goals>
+                    <goal>add-source</goal>
+                </goals>
+                <configuration>
+                    <sources>
+                        <source>
+                            ${project.build.directory}/shared_sources
+                        </source>
+                        <source>
+                            ${project.build.directory}/tomahawk11_sources
+                        </source>
+                    </sources>
+                </configuration>
+            </execution>
+        </executions>
+      </plugin>    
+      <plugin>
+        <groupId>org.apache.myfaces.buildtools</groupId>
+        <artifactId>myfaces-builder-plugin</artifactId>
+        <version>1.0.1-SNAPSHOT</version>
+        <executions>
+	      <execution>
+            <id>unpack-tomahawk</id>
+            <phase>generate-sources</phase>
+            <!-- <phase>process-resources</phase> -->
+            <goals>
+              <goal>unpack</goal>
+            </goals>
+            <configuration>
+              <scanModel>true</scanModel>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>org.apache.myfaces.tomahawk</groupId>
+                  <artifactId>tomahawk</artifactId>
+                  <version>1.1.7-SNAPSHOT</version>
+                  <classifier>sources</classifier>                   
+                  <!-- <outputDirectory>${project.build.directory}/unpacktomahawksources</outputDirectory> -->
+                  <outputDirectory>${project.build.directory}/tomahawk11_sources</outputDirectory>
+                  <includes>**/*.java</includes>
+                  <excludes>**/*.class,**/META-INF/**,org/apache/myfaces/shared_tomahawk/**/*.java</excludes>
+                </artifactItem>
+              </artifactItems>
+            </configuration>
+          </execution>
+          <execution>
+            <id>unpack-tomahawk-resources</id>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>unpack</goal>
+            </goals>
+            <configuration>
+              <baseDirectory1>${basedir}/src/main/resources</baseDirectory1>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>org.apache.myfaces.tomahawk</groupId>
+                  <artifactId>tomahawk</artifactId>
+                  <version>1.1.7-SNAPSHOT</version>                                   
+                  <outputDirectory>${project.build.directory}/tomahawk11_resources</outputDirectory>
+                  <excludes>**/*.class,**/META-INF/**</excludes>
+                </artifactItem>
+              </artifactItems>
+            </configuration>
+          </execution>
+          <execution>
+            <!-- A hierarchy of different tag classes must be created, 
+            because this classes are not part of the public api. The
+            generation of all html package is the same. Please note that
+            we need only a subset -->          
+            <configuration>
+                <replacePackagePrefixTagFrom>org.apache.myfaces.taglib</replacePackagePrefixTagFrom>
+                <replacePackagePrefixTagTo>org.apache.myfaces.shared_tomahawk.taglib</replacePackagePrefixTagTo>
+            </configuration>
+            <goals>
+              <goal>build-metadata</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>makefacesconfig</id>
+            <configuration>
+                <templateFile>faces-config12.vm</templateFile>
+                <xmlFile>META-INF/faces-config.xml</xmlFile>
+            </configuration>
+            <goals>
+                <goal>make-config</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>makecomp</id>
+            <goals>
+              <goal>make-components</goal>
+            </goals>
+            <configuration>
+               <jsfVersion>12</jsfVersion>
+               <templateComponentName>componentClass12.vm</templateComponentName>
+               <mainSourceDirectory2>${project.build.directory}/tomahawk11_sources</mainSourceDirectory2>
+            </configuration>
+          </execution>          
+          <execution>
+            <id>make_tags_myfaces_core</id>
+            <configuration>
+                <packageContains>org.apache.myfaces.shared_tomahawk.taglib</packageContains>
+                <typePrefix>javax.faces</typePrefix>
+                <modelIds>
+                    <modelId>myfaces-api</modelId>
+                </modelIds>
+                <jsfVersion>12</jsfVersion>
+                <templateTagName>tagClass12.vm</templateTagName>
+            </configuration>
+            <goals>
+                <goal>make-tags</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>make_tags_tomahawk</id>
+            <configuration>
+               <jsfVersion>12</jsfVersion>
+               <templateTagName>tagClass12.vm</templateTagName>
+               <mainSourceDirectory2>${project.build.directory}/tomahawk11_sources</mainSourceDirectory2>
+            </configuration>            
+            <goals>
+                <goal>make-tags</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>make_validator_tags_tomahawk</id>
+            <configuration>
+               <jsfVersion>12</jsfVersion>
+            </configuration>            
+            <goals>
+                <goal>make-validator-tags</goal>
+                <goal>make-converter-tags</goal>
+            </goals>
+          </execution>          
+          <execution>
+            <id>maketomahawktld</id>
+            <configuration>
+                <xmlFile>META-INF/tomahawk.tld</xmlFile>
+                <xmlBaseFile>src/main/conf/META-INF/tomahawk-base.tld</xmlBaseFile>
+                <templateFile>tomahawk12.vm</templateFile>
+                <params>
+                   <shortname>t</shortname>
+                   <uri>http://myfaces.apache.org/tomahawk</uri>
+                   <displayname>Tomahawk tag library 1.2.</displayname>
+                   <description> MyFaces subproject that contains components and other goodies to be used with any JSF implementation.</description>
+                </params>
+                <modelIds>
+                    <modelId>tomahawk12</modelId>
+                </modelIds>
+            </configuration>
+            <goals>
+                <goal>make-config</goal>
+            </goals>
+          </execution>        
+        </executions>
+      </plugin>
+      <plugin>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.4.2</version>
+        <configuration>
+          <excludes>
+            <exclude>**/Abstract*.java</exclude>
+            <exclude>**/*HtmlDateRendererTest*</exclude>
+            <exclude>**/TestUtils.java</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+      <!-- 
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>xslt-maven-plugin</artifactId>
+        <version>1.0</version>
+        <configuration>
+          <xslFile>src/main/tld/misc/resolve_entities.xsl</xslFile>
+          <srcIncludes>**/*.tld</srcIncludes>
+          <srcDir>src/main/tld</srcDir>
+          <destDir>target/classes/META-INF</destDir>
+        </configuration>
+        <executions>
+          <execution>
+            <goals>
+              <goal>transform</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+       -->
+
+      <plugin>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <version>2.0</version>
+        <executions>
+          <execution>
+            <id>unpack-shared-tomahawk</id>
+            <phase>process-classes</phase>
+            <goals><goal>unpack</goal></goals>
+            <configuration>
+              <artifactItems>
+                <artifactItem>
+                   <groupId>org.apache.myfaces.shared</groupId>
+                   <artifactId>myfaces-shared-tomahawk</artifactId>
+                   <version>3.0.4-SNAPSHOT</version>
+                 </artifactItem>
+               </artifactItems>
+               <outputDirectory>${project.build.directory}/classes</outputDirectory>
+            </configuration>
+          </execution>
+          <!-- unpack the shared sources into target/shared_sources-->
+          <execution>
+            <id>unpack-shared-impl-sources</id>
+            <phase>process-sources</phase>
+            <goals>
+                <goal>unpack</goal>
+            </goals>
+            <configuration>
+                <artifactItems>
+                    <artifactItem>
+                        <groupId>org.apache.myfaces.shared</groupId>
+                        <artifactId>myfaces-shared-tomahawk</artifactId>
+                        <version>3.0.4-SNAPSHOT</version>
+                        <classifier>sources</classifier>
+                    </artifactItem>
+                </artifactItems>
+                <outputDirectory>${project.build.directory}/shared_sources</outputDirectory>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+      	<artifactId>maven-source-plugin</artifactId>
+      	<executions>
+      		<execution>
+      			<id>attach-source</id>
+      			<goals>
+      				<goal>jar</goal>
+      			</goals>
+      		</execution>
+      	</executions>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+
+    </plugins>
+
+  </build>
+
+  <reporting>
+
+    <plugins>
+
+      <plugin>
+        <artifactId>maven-changelog-plugin</artifactId>
+        <version>2.1</version>
+        <reportSets>
+          <reportSet>
+            <id>dual-report</id>
+            <configuration>
+              <type>range</type>
+              <range>30</range>
+            </configuration>
+            <reports>
+              <report>changelog</report>
+              <report>file-activity</report>
+              <report>dev-activity</report>
+            </reports>
+          </reportSet>
+        </reportSets>
+      </plugin>
+
+      <plugin>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <version>2.4</version>
+        <configuration>
+            <sourcepath>${basedir}/src/main/java;${basedir}/target/tomahawk11_sources;${basedir}/target/maven-faces-plugin/main/java</sourcepath>
+        </configuration>
+        
+      </plugin>
+
+      <plugin>
+        <artifactId>maven-jxr-plugin</artifactId>
+        <version>2.1</version>
+      </plugin>
+
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>taglist-maven-plugin</artifactId>
+        <version>2.0</version>
+      </plugin>
+
+      <plugin>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+        <version>2.4</version>
+      </plugin>
+      <!-- This plugin is reffered on myfaces master pom, but
+           this is needed to set targetJdk to 1.5 -->
+      <plugin>
+        <artifactId>maven-pmd-plugin</artifactId>
+        <version>2.2</version>
+        <configuration>
+          <rulesets>
+            <ruleset>/rulesets/basic.xml</ruleset>
+            <ruleset>/rulesets/unusedcode.xml</ruleset>
+          </rulesets>
+          <linkXref>true</linkXref>
+          <minimumTokens>100</minimumTokens>
+          <targetJdk>1.5</targetJdk>
+        </configuration>
+      </plugin>
+    </plugins>
+
+  </reporting>
+
+  <profiles>
+    <profile>
+      <id>generate-site</id>
+      <build>
+        <plugins>
+          <!-- 
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>xslt-maven-plugin</artifactId>
+            <version>1.0</version>
+            <executions>
+              <execution>
+                <id>generate-tld-for-tlddoc</id>
+                <goals>
+                  <goal>transform</goal>
+                </goals>
+                <configuration>
+                  <xslFile>src/main/tld/misc/resolve_entities-tlddoc.xsl</xslFile>
+                  <srcIncludes>**/*.tld</srcIncludes>
+                  <srcDir>src/main/tld</srcDir>
+                  <destDir>target/tlddoc-site</destDir>
+                </configuration>
+              </execution>
+              <execution>
+                <id>generate-tld-for-jar</id>
+                <goals>
+                  <goal>transform</goal>
+                </goals>
+                <configuration>
+                  <xslFile>src/main/tld/misc/resolve_entities.xsl</xslFile>
+                  <srcIncludes>**/*.tld</srcIncludes>
+                  <srcDir>src/main/tld</srcDir>
+                  <destDir>target/classes/META-INF</destDir>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          -->
+        </plugins>
+      </build>
+      <reporting>
+        <plugins>
+          <plugin>
+            <groupId>net.sourceforge.maven-taglib</groupId>
+            <artifactId>maven-taglib-plugin</artifactId>
+            <configuration>
+              <taglib.src.dir>${basedir}/target/classes/META-INF</taglib.src.dir>
+              <tldDocDir>${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.codehaus.mojo</groupId>
+            <artifactId>xslt-maven-plugin</artifactId>
+            <version>1.0</version>
+            <executions>
+              <execution>
+                <id>generate-tld-for-tlddoc</id>
+                <goals>
+                  <goal>transform</goal>
+                </goals>
+                <configuration>
+                  <xslFile>src/main/tld/misc/resolve_entities-tlddoc.xsl</xslFile>
+                  <srcIncludes>**/*.tld</srcIncludes>
+                  <srcDir>src/main/tld</srcDir>
+                  <destDir>target/tlddoc-site</destDir>
+                </configuration>
+              </execution>
+              <execution>
+                <id>generate-tld-for-jar</id>
+                <goals>
+                  <goal>transform</goal>
+                </goals>
+                <configuration>
+                  <xslFile>src/main/tld/misc/resolve_entities.xsl</xslFile>
+                  <srcIncludes>**/*.tld</srcIncludes>
+                  <srcDir>src/main/tld</srcDir>
+                  <destDir>target/classes/META-INF</destDir>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+           -->
+          <plugin>
+            <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>
+            <configuration>
+              <taglib.src.dir>${basedir}/target/classes/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>
+            <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/tomahawk/trunk/core12/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/core12/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/tomahawk/trunk/core12/src/main/conf/META-INF/faces-config-base.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/main/conf/META-INF/faces-config-base.xml?rev=664402&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/main/conf/META-INF/faces-config-base.xml (added)
+++ myfaces/tomahawk/trunk/core12/src/main/conf/META-INF/faces-config-base.xml Sat Jun  7 14:59:02 2008
@@ -0,0 +1,70 @@
+<?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.
+-->
+
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee" 
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd" 
+              version="1.2">
+
+  <lifecycle>
+      <!-- 
+      <phase-listener>org.apache.myfaces.webapp.filter.ServeResourcePhaseListener</phase-listener>
+       -->
+      <phase-listener>org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener</phase-listener>
+      <!-- This PhaseListener is only necessary if the autoscroll feature is used -->
+      <phase-listener>org.apache.myfaces.renderkit.html.util.AutoScrollPhaseListener</phase-listener>
+  </lifecycle>
+  <!-- 
+  <factory>
+      <faces-context-factory>org.apache.myfaces.webapp.filter.TomahawkFacesContextFactory</faces-context-factory>
+  </factory>
+   -->
+    <!-- additional "by type" converters -->
+    
+    <converter>
+        <converter-for-class>java.math.BigDecimal</converter-for-class>
+        <converter-class>javax.faces.convert.BigDecimalConverter</converter-class>
+    </converter>
+
+    <converter>
+        <converter-for-class>java.math.BigInteger</converter-for-class>
+        <converter-class>javax.faces.convert.BigIntegerConverter</converter-class>
+    </converter>
+
+    <converter>
+        <converter-for-class>java.util.Date</converter-for-class>
+        <converter-class>javax.faces.convert.DateTimeConverter</converter-class>
+    </converter>
+
+
+    <!-- non standard converters -->
+
+    <converter>
+        <converter-for-class>[Ljava.lang.String;</converter-for-class>
+        <converter-class>org.apache.myfaces.convert.StringArrayConverter</converter-class>
+    </converter>
+
+    <converter>
+        <converter-for-class>org.apache.myfaces.custom.fileupload.UploadedFile</converter-for-class>
+        <converter-class>org.apache.myfaces.custom.fileupload.UploadedFileConverter</converter-class>
+    </converter>
+
+</faces-config>

Propchange: myfaces/tomahawk/trunk/core12/src/main/conf/META-INF/faces-config-base.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/core12/src/main/conf/META-INF/faces-config-base.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/tomahawk/trunk/core12/src/main/conf/META-INF/tomahawk-base.tld
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/main/conf/META-INF/tomahawk-base.tld?rev=664402&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/main/conf/META-INF/tomahawk-base.tld (added)
+++ myfaces/tomahawk/trunk/core12/src/main/conf/META-INF/tomahawk-base.tld Sat Jun  7 14:59:02 2008
@@ -0,0 +1,25 @@
+<?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.
+-->
+<taglib xmlns="http://java.sun.com/xml/ns/javaee" 
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd" 
+        version="2.1">
+   
+</taglib>
\ No newline at end of file

Propchange: myfaces/tomahawk/trunk/core12/src/main/conf/META-INF/tomahawk-base.tld
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/core12/src/main/conf/META-INF/tomahawk-base.tld
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/component/MethodBindingToMethodExpression.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/component/MethodBindingToMethodExpression.java?rev=664402&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/component/MethodBindingToMethodExpression.java (added)
+++ myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/component/MethodBindingToMethodExpression.java Sat Jun  7 14:59:02 2008
@@ -0,0 +1,244 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * 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.
+ */
+
+package org.apache.myfaces.component;
+
+import javax.el.ELContext;
+import javax.el.ELException;
+import javax.el.MethodExpression;
+import javax.el.MethodInfo;
+import javax.el.MethodNotFoundException;
+import javax.el.PropertyNotFoundException;
+import javax.faces.component.StateHolder;
+import javax.faces.context.FacesContext;
+import javax.faces.el.EvaluationException;
+import javax.faces.el.MethodBinding;
+
+import org.apache.myfaces.shared_tomahawk.util.ClassUtils;
+
+/**
+ * Converts a MethodBinding to a MethodExpression
+ * 
+ * TODO: find a way to share the implementation of class with impl.
+ * 
+ * @author Stan Silvert
+ */
+@SuppressWarnings("deprecation")
+public class MethodBindingToMethodExpression extends MethodExpression implements StateHolder
+{
+    private static final Class[] EXPECTED_TYPES = new Class[] { MethodBinding.class, StateHolder.class };
+
+    private MethodBinding methodBinding;
+
+    private boolean _transientFlag;
+
+    private transient MethodInfo methodInfo;
+
+    /**
+     * No-arg constructor used during restoreState
+     */
+    protected MethodBindingToMethodExpression()
+    {
+    }
+
+    /** Creates a new instance of MethodBindingToMethodExpression */
+    public MethodBindingToMethodExpression(MethodBinding methodBinding)
+    {
+        checkNullArgument(methodBinding, "methodBinding");
+        this.methodBinding = methodBinding;
+    }
+
+    /**
+     * Return the wrapped MethodBinding.
+     */
+    public MethodBinding getMethodBinding()
+    {
+        return methodBinding;
+    }
+    
+    void setMethodBinding(MethodBinding methodBinding)
+    {
+        this.methodBinding = methodBinding;
+    }
+
+    /**
+     * Note: MethodInfo.getParamTypes() may incorrectly return an empty class array if invoke() has not been called.
+     * 
+     * @throws IllegalStateException
+     *             if expected params types have not been determined.
+     */
+    public MethodInfo getMethodInfo(ELContext context) throws PropertyNotFoundException, MethodNotFoundException,
+            ELException
+    {
+        checkNullArgument(context, "elcontext");
+        checkNullState(methodBinding, "methodBinding");
+
+        if (methodInfo == null)
+        {
+            final FacesContext facesContext = (FacesContext) context.getContext(FacesContext.class);
+            if (facesContext != null)
+            {
+                methodInfo = invoke(new Invoker<MethodInfo>()
+                {
+                    public MethodInfo invoke()
+                    {
+                        return new MethodInfo(null, methodBinding.getType(facesContext), null);
+                    }
+                });
+            }
+        }
+        return methodInfo;
+    }
+
+    public Object invoke(ELContext context, final Object[] params) throws PropertyNotFoundException,
+            MethodNotFoundException, ELException
+    {
+        checkNullArgument(context, "elcontext");
+        checkNullState(methodBinding, "methodBinding");
+        final FacesContext facesContext = (FacesContext) context.getContext(FacesContext.class);
+        if (facesContext != null)
+        {
+            return invoke(new Invoker<Object>()
+            {
+                public Object invoke()
+                {
+                    return methodBinding.invoke(facesContext, params);
+                }
+            });
+        }
+        return null;
+    }
+
+    public boolean isLiteralText()
+    {
+        if (methodBinding == null)
+            throw new IllegalStateException("methodBinding is null");
+        String expr = methodBinding.getExpressionString();
+        return !(expr.startsWith("#{") && expr.endsWith("}"));
+    }
+
+    public String getExpressionString()
+    {
+        return methodBinding.getExpressionString();
+    }
+
+    public Object saveState(FacesContext context)
+    {
+        if (!isTransient())
+        {
+            if (methodBinding instanceof StateHolder)
+            {
+                Object[] state = new Object[2];
+                state[0] = methodBinding.getClass().getName();
+                state[1] = ((StateHolder) methodBinding).saveState(context);
+                return state;
+            }
+            else
+            {
+                return methodBinding;
+            }
+        }
+        return null;
+    }
+
+    public void restoreState(FacesContext context, Object state)
+    {
+        if (state instanceof MethodBinding)
+        {
+            methodBinding = (MethodBinding) state;
+            methodInfo = null;
+        }
+        else if (state != null)
+        {
+            Object[] values = (Object[]) state;
+            methodBinding = (MethodBinding) ClassUtils.newInstance(values[0].toString(), EXPECTED_TYPES);
+            ((StateHolder) methodBinding).restoreState(context, values[1]);
+            methodInfo = null;
+        }
+    }
+
+    public void setTransient(boolean transientFlag)
+    {
+        _transientFlag = transientFlag;
+    }
+
+    public boolean isTransient()
+    {
+        return _transientFlag;
+    }
+
+    @Override
+    public int hashCode()
+    {
+        final int PRIME = 31;
+        int result = 1;
+        result = PRIME * result + ((methodBinding == null) ? 0 : methodBinding.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj)
+    {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        final MethodBindingToMethodExpression other = (MethodBindingToMethodExpression) obj;
+        if (methodBinding == null)
+        {
+            if (other.methodBinding != null)
+                return false;
+        }
+        else if (!methodBinding.equals(other.methodBinding))
+            return false;
+        return true;
+    }
+
+    private void checkNullState(Object notNullInstance, String instanceName)
+    {
+        if (notNullInstance == null)
+            throw new IllegalStateException(instanceName + " is null");
+    }
+
+    private void checkNullArgument(Object notNullInstance, String instanceName)
+    {
+        if (notNullInstance == null)
+            throw new IllegalArgumentException(instanceName + " is null");
+    }
+
+    private <T> T invoke(Invoker<T> invoker)
+    {
+        try
+        {
+            return invoker.invoke();
+        }
+        catch (javax.faces.el.MethodNotFoundException e)
+        {
+            throw new MethodNotFoundException(e.getMessage(), e);
+        }
+        catch (EvaluationException e)
+        {
+            throw new ELException(e.getMessage(), e);
+        }
+    }
+
+    private interface Invoker<T>
+    {
+        T invoke();
+    }
+}

Propchange: myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/component/MethodBindingToMethodExpression.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/component/MethodBindingToMethodExpression.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/component/MethodExpressionToMethodBinding.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/component/MethodExpressionToMethodBinding.java?rev=664402&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/component/MethodExpressionToMethodBinding.java (added)
+++ myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/component/MethodExpressionToMethodBinding.java Sat Jun  7 14:59:02 2008
@@ -0,0 +1,104 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * 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.
+ */
+
+package org.apache.myfaces.component;
+
+import javax.el.ELException;
+import javax.el.MethodExpression;
+import javax.faces.component.StateHolder;
+import javax.faces.context.FacesContext;
+import javax.faces.el.EvaluationException;
+import javax.faces.el.MethodBinding;
+import javax.faces.el.MethodNotFoundException;
+
+/**
+ * Converts a MethodExpression to a MethodBinding.  
+ * See JSF 1.2 spec section 5.8.4
+ *
+ * ATTENTION: If you make changes to this class, treat 
+ * org.apache.myfaces.el.convert.MethodExpressionToMethodBinding
+ * accordingly.
+ *
+ * @author Stan Silvert
+ * @see org.apache.myfaces.el.convert.MethodExpressionToMethodBinding
+ */
+public class MethodExpressionToMethodBinding extends MethodBinding implements StateHolder {
+    
+    private MethodExpression methodExpression;
+    
+    private boolean isTransient = false;
+    
+    public MethodExpressionToMethodBinding() {
+        methodExpression = null;
+    }
+
+    /** Creates a new instance of MethodExpressionToMethodBinding */
+    public MethodExpressionToMethodBinding(MethodExpression methodExpression) {
+        this.methodExpression = methodExpression;
+    }
+    
+    @Override
+    public String getExpressionString()
+    {
+        return methodExpression.getExpressionString();
+    }
+
+    public Class getType(FacesContext facesContext) 
+        throws MethodNotFoundException {
+        
+        try {
+            return methodExpression.getMethodInfo(facesContext.getELContext()).getReturnType();
+        } catch (javax.el.MethodNotFoundException e) {
+            throw new javax.faces.el.MethodNotFoundException(e);
+        } catch (ELException e) {
+            throw new EvaluationException(e);
+        }
+    }
+
+    public Object invoke(FacesContext facesContext, Object[] params) 
+        throws EvaluationException, MethodNotFoundException {
+        
+        try {
+            return methodExpression.invoke(facesContext.getELContext(), params);
+        } catch (javax.el.MethodNotFoundException e) {
+            throw new javax.faces.el.MethodNotFoundException(e);
+        } catch (ELException e) {
+            throw new EvaluationException(e);
+        }
+    }
+
+// -------- StateHolder methods -------------------------------------------    
+    
+    public void restoreState(FacesContext context, Object state) {
+        if(state != null)
+            methodExpression = (MethodExpression)state;
+    }
+
+    public Object saveState(FacesContext context) {
+        if(!isTransient)
+            return methodExpression;
+        return null;
+    }
+
+    public void setTransient(boolean newTransientValue) {
+        isTransient = newTransientValue;
+    }
+
+    public boolean isTransient() {
+        return isTransient;
+    }
+    
+}

Propchange: myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/component/MethodExpressionToMethodBinding.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/component/MethodExpressionToMethodBinding.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/converter/ConverterTag.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/converter/ConverterTag.java?rev=664402&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/converter/ConverterTag.java (added)
+++ myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/converter/ConverterTag.java Sat Jun  7 14:59:02 2008
@@ -0,0 +1,132 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * 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.
+ */
+package org.apache.myfaces.converter;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.webapp.ConverterELTag;
+import javax.servlet.jsp.JspException;
+
+/**
+ * Implementation of ConverterELTag
+ * 
+ * This is a copy of org.apache.myfaces.taglib.core.ConverterTag from 
+ * myfaces core impl 1.2. This is copied here because we need a base class
+ * where all custom converters must inherit. 
+ *
+ * @author Bruno Aranda (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+public class ConverterTag extends ConverterELTag
+{
+
+    private static final long serialVersionUID = -4506829108081L;
+    private ValueExpression _converterId;
+    private ValueExpression _binding;
+    private String _converterIdString = null;
+
+    public ConverterTag()
+    {
+        super();
+    }
+
+    public void setConverterId(ValueExpression converterId)
+    {
+        _converterId = converterId;
+    }
+
+    public void setBinding(ValueExpression binding)
+    {
+        _binding = binding;
+    }
+
+    /**
+     * Use this method to specify the converterId programmatically.
+     *
+     * @param converterIdString
+     */
+    public void setConverterIdString(String converterIdString)
+    {
+        _converterIdString = converterIdString;
+    }
+
+    public void release()
+    {
+        super.release();
+        _converterId = null;
+        _binding = null;
+        _converterIdString = null;
+    }
+
+    protected Converter createConverter()
+            throws JspException
+    {
+        Converter converter = null;
+
+        FacesContext facesContext = FacesContext.getCurrentInstance();
+        ELContext elContext = facesContext.getELContext();
+
+        // try to create the converter from the binding expression first, and then from
+        // the converterId
+        if (_binding != null)
+        {
+            try
+            {
+                converter = (Converter) _binding.getValue(elContext);
+
+                if (converter != null)
+                {
+                    return converter;
+                }
+            }
+            catch (Exception e)
+            {
+                throw new JspException("Exception creating converter using binding", e);
+            }
+        }
+
+        if ((_converterId != null) || (_converterIdString != null))
+        {
+            try
+            {
+                if (null != _converterIdString)
+                {
+                    converter = facesContext.getApplication().createConverter(_converterIdString);
+                } else 
+                {
+                    String converterId = (String) _converterId.getValue(elContext);
+                    converter = facesContext.getApplication().createConverter(converterId);
+                }
+
+                // with binding no converter was created, set its value with the converter
+                // created using the converterId
+                if (converter != null && _binding != null)
+                {
+                    _binding.setValue(elContext, converter);
+                }
+            }
+            catch (Exception e)
+            {
+                throw new JspException("Exception creating converter with converterId: " + _converterId, e);
+            }
+        }
+
+        return converter;
+    }
+
+}

Propchange: myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/converter/ConverterTag.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/converter/ConverterTag.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/Alias.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/Alias.java?rev=664402&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/Alias.java (added)
+++ myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/Alias.java Sat Jun  7 14:59:02 2008
@@ -0,0 +1,160 @@
+/*
+ * 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.custom.aliasbean;
+
+import javax.el.ValueExpression;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * A helper bean used by both AliasBean and AliasBeansScope components.
+ * <p>
+ * An Alias instance represents a single mapping from a "temporary" bean name
+ * to the real bean that temporary name should reference. When this alias
+ * is "activated" the temporary name is registered and when the alias is
+ * "deactivated" the temporary name is removed.
+ *
+ * @author Sylvain Vieujot (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+
+class Alias {
+    static final Log log = LogFactory.getLog(Alias.class);
+	
+	private transient UIComponent _aliasComponent;
+	private String _aliasBeanExpression;
+    private String _valueExpression;
+	private transient boolean _active = false;
+	
+	private transient Object evaluatedExpression = null;
+
+	Alias(AliasBean aliasComponent){
+		this._aliasComponent = aliasComponent;
+	}
+
+	/**
+	 * Define the temporary/transient name that will exist while this alias
+	 * is "active" (in scope). This is usually a constant string.
+	 */
+	void setAliasBeanExpression(String aliasBeanExpression){
+		this._aliasBeanExpression = aliasBeanExpression;
+	}
+	
+	/**
+	 * Define the object that will be referenced by the temporary/transient
+	 * name while it exists.
+	 * <p>
+	 * This can be a constant, but is more usually an EL expression. The value is
+	 * recalculated each time this alias is "activated".
+	 */
+	void setValueExpression(String valueExpression){
+		this._valueExpression = valueExpression;
+	}
+	
+	String getValueExpression(){
+		return _valueExpression;
+	}
+	
+	boolean isActive(){
+		return _active;
+	}
+	
+	String[] saveState(){
+		return new String[]{_aliasBeanExpression, _valueExpression};
+	}
+	
+	void restoreState(Object state){
+		String[] values = (String[]) state;
+		_aliasBeanExpression = values[0];
+		_valueExpression = values[1];
+	}
+	
+	private void computeEvaluatedExpression(FacesContext facesContext){
+		if( evaluatedExpression != null )
+			return;
+		
+		ValueExpression valueVB = null;
+        if (_valueExpression == null) {
+            valueVB = _aliasComponent.getValueExpression("value");
+            _valueExpression = valueVB.getExpressionString();
+        }
+
+        if( valueVB == null ){
+            if( _valueExpression.startsWith("#{") ){
+                valueVB = facesContext.getApplication().getExpressionFactory()
+                    .createValueExpression(facesContext.getELContext(),                            
+                            _valueExpression,
+                            Object.class);
+				evaluatedExpression = valueVB.getValue(facesContext.getELContext());
+            }else{
+				evaluatedExpression = _valueExpression;
+            }
+        }else{
+			evaluatedExpression = valueVB.getValue(facesContext.getELContext());
+        }
+	}
+
+	/**
+	 * Activate this alias (ie create the temporary name).
+	 */
+	void make(FacesContext facesContext){
+		if( _active )
+			return;
+
+        ValueExpression aliasVB;
+        if (_aliasBeanExpression == null) {
+            aliasVB = _aliasComponent.getValueExpression("alias");
+			if( aliasVB == null )
+				return;
+            _aliasBeanExpression = aliasVB.getExpressionString();
+			if( _aliasBeanExpression == null )
+				return;
+        } else {
+            aliasVB = facesContext.getApplication().getExpressionFactory().
+                createValueExpression(facesContext.getELContext(),_aliasBeanExpression,Object.class);
+        }
+
+		computeEvaluatedExpression( facesContext );
+		
+        aliasVB.setValue(facesContext.getELContext(), evaluatedExpression);
+		_active = true;
+
+        log.debug("makeAlias: " + _valueExpression + " = " + _aliasBeanExpression);
+	}
+	
+	/**
+	 * Deactivate this alias (ie remove the temporary name).
+	 */
+	void remove(FacesContext facesContext){
+        _active = false;
+		if( evaluatedExpression == null )
+			return;
+        
+        evaluatedExpression = null;
+
+        log.debug("removeAlias: " + _valueExpression + " != " + _aliasBeanExpression);
+        ValueExpression aliasVB = _aliasComponent.getValueExpression("alias");
+        if( aliasVB != null )
+			aliasVB.setValue(facesContext.getELContext(), null);
+	}
+}

Propchange: myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/Alias.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/Alias.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBean.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBean.java?rev=664402&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBean.java (added)
+++ myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBean.java Sat Jun  7 14:59:02 2008
@@ -0,0 +1,373 @@
+/*
+ * 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.custom.aliasbean;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.el.ValueExpression;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.FacesEvent;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.shared_tomahawk.component.BindingAware;
+import org.apache.myfaces.shared_tomahawk.util.RestoreStateUtils;
+import org.apache.myfaces.shared_tomahawk.util._ComponentUtils;
+
+/**
+ * The aliasBean tag allows you to create a temporary name for a real bean.
+ * The temporary name exists (is visible) only to the children of the aliasBean.
+ * <p>
+ * One use of this feature is to pass "parameters" from an including page to an
+ * included one. The included page can use any name it desires for beans it needs to
+ * reference, and the including page can then use aliasBean to make those names
+ * refer to the beans it wishes to "pass" as parameters.
+ * <p>
+ * Suppose you have a block of components you use often but with different beans. You
+ * can create a separate JSP page (or equivalent) containing these beans, where the
+ * value-bindings refer to some fictive bean name. Document these names as the required
+ * "parameters" for this JSP page. Wherever you wish to use this block you then declare
+ * an alias component mapping each of these "parameters" to whatever beans (or literal
+ * values) you really want to apply the block to, then use jsp:include (or equivalent)
+ * to include the reusable block of components.
+ * <p>
+ * Note, however, that AliasBean does not work for component bindings; JSF1.1
+ * just has no mechanism available to set up the alias during the "restore view"
+ * phase while the bindings of its children are being re-established, and then
+ * remove the alias after the child bindings are done.
+ * <p>
+ * As a special case, if this component's direct parent is an AliasBeansScope
+ * then the alias (temporary name) is active until the end of the parent
+ * component, rather than the end of this component.
+ *
+ * @JSFComponent
+ *   name = "t:aliasBean"
+ *   tagClass = "org.apache.myfaces.custom.aliasbean.AliasBeanTag"
+ * 
+ * @JSFJspProperty 
+ *   name = "rendered"
+ *   returnType = "boolean" 
+ *   tagExcluded = "true"
+ *   
+ * @JSFJspProperty
+ *   name = "binding"
+ *   returnType = "java.lang.String"
+ *   tagExcluded = "true"
+ * 
+ * @author Sylvain Vieujot (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+public class AliasBean extends UIComponentBase implements BindingAware
+{
+    private static final Log log = LogFactory.getLog(AliasBean.class);
+
+    public static final String COMPONENT_TYPE = "org.apache.myfaces.AliasBean";
+    public static final String COMPONENT_FAMILY = "javax.faces.Data";
+
+    private Alias alias;
+    
+    // Indicates whether withinScope has been initialised or not.
+    private boolean scopeSearched = false;
+    
+    // True if this is a direct child of an AliasBeansScope component.
+    private boolean withinScope;
+
+    private transient FacesContext _context = null;
+
+    public AliasBean()
+    {
+        alias = new Alias(this);
+    }
+
+    public String getFamily()
+    {
+        return COMPONENT_FAMILY;
+    }
+
+    public String getRendererType() {
+        return null;
+    }
+
+    /**
+     * Define the "fictive" name which will be visible to the children
+     * of this component as an alias to the "real" object specified
+     * by the value attribute of this component.
+     *
+     * @JSFProperty
+     * @param aliasBeanExpression
+     */
+    public void setAlias(String aliasBeanExpression)
+    {
+        alias.setAliasBeanExpression(aliasBeanExpression);
+    }
+
+    /**
+     * The existing value that the alias can be set to. This can be 
+     * a literal string (like "toto") or a reference to an existing 
+     * bean (like "#{myBean.member1}").
+     * 
+     * @JSFProperty
+     */
+    public String getValue()
+    {
+        String valueExpression = alias.getValueExpression();
+        if (valueExpression != null)
+            return valueExpression;
+
+        // Normally, this component will have no value, because the setValue method always
+        // passes that data on to the alias instead. However it is possible for someone
+        // to use f:attribute (or other mechanism?) to set the value instead. So when the
+        // alias has no value, look for it there.
+        ValueExpression vb = getValueExpression("value");
+        return vb != null ?  (String) vb.getValue(getFacesContext().getELContext()) : null;
+    }
+
+    public void setValue(String valueExpression)
+    {
+        alias.setValueExpression(valueExpression);
+    }
+
+    public Object saveState(FacesContext context)
+    {
+        log.debug("saveState");
+
+        _context = context;
+
+        return new Object[]{super.saveState(context), alias.saveState()};
+    }
+
+    public void restoreState(FacesContext context, Object state)
+    {
+        log.debug("restoreState");
+
+        _context = context;
+
+        Object values[] = (Object[]) state;
+        super.restoreState(context, values[0]);
+        alias.restoreState(values[1]);
+    }
+
+    public Object processSaveState(FacesContext context)
+    {
+        if (context == null)
+            throw new NullPointerException("context");
+        if (isTransient())
+            return null;
+
+        makeAlias(context);
+
+        Map facetMap = null;
+        for (Iterator it = getFacets().entrySet().iterator(); it.hasNext();)
+        {
+            Map.Entry entry = (Map.Entry) it.next();
+            if (facetMap == null)
+                facetMap = new HashMap();
+            UIComponent component = (UIComponent) entry.getValue();
+            if (!component.isTransient())
+            {
+                facetMap.put(entry.getKey(), component.processSaveState(context));
+            }
+        }
+        List childrenList = null;
+        if (getChildCount() > 0)
+        {
+            for (Iterator it = getChildren().iterator(); it.hasNext();)
+            {
+                UIComponent child = (UIComponent) it.next();
+                if (!child.isTransient())
+                {
+                    if (childrenList == null)
+                        childrenList = new ArrayList(getChildCount());
+                    childrenList.add(child.processSaveState(context));
+                }
+            }
+        }
+
+        removeAlias(context);
+
+        return new Object[]{saveState(context), facetMap, childrenList};
+    }
+
+    public void processRestoreState(FacesContext context, Object state)
+    {
+        if (context == null)
+            throw new NullPointerException("context");
+        Object myState = ((Object[]) state)[0];
+
+        restoreState(context, myState);
+        makeAlias(context);
+
+        Map facetMap = (Map) ((Object[]) state)[1];
+        List childrenList = (List) ((Object[]) state)[2];
+        for (Iterator it = getFacets().entrySet().iterator(); it.hasNext();)
+        {
+            Map.Entry entry = (Map.Entry) it.next();
+            Object facetState = facetMap.get(entry.getKey());
+            if (facetState != null)
+            {
+                ((UIComponent) entry.getValue()).processRestoreState(context, facetState);
+            }
+            else
+            {
+                context.getExternalContext().log("No state found to restore facet " + entry.getKey());
+            }
+        }
+        if (getChildCount() > 0)
+        {
+            int idx = 0;
+            for (Iterator it = getChildren().iterator(); it.hasNext();)
+            {
+                UIComponent child = (UIComponent) it.next();
+                Object childState = childrenList.get(idx++);
+                if (childState != null)
+                {
+                    child.processRestoreState(context, childState);
+                }
+                else
+                {
+                    context.getExternalContext().log("No state found to restore child of component " + getId());
+                }
+            }
+        }
+
+        removeAlias(context);
+    }
+
+    public void processValidators(FacesContext context)
+    {
+        if (withinScope)
+            return;
+
+        log.debug("processValidators");
+        makeAlias(context);
+        super.processValidators(context);
+        removeAlias(context);
+    }
+
+    public void processDecodes(FacesContext context)
+    {
+        log.debug("processDecodes");
+        if (withinScope)
+        {
+            if (! alias.isActive())
+                makeAlias(context);
+
+            super.processDecodes(context);
+            return;
+        }
+
+        makeAlias(context);
+        super.processDecodes(context);
+        removeAlias(context);
+    }
+
+    public void processUpdates(FacesContext context)
+    {
+        if (withinScope)
+            return;
+
+        log.debug("processUpdates");
+        makeAlias(context);
+        super.processUpdates(context);
+        removeAlias(context);
+    }
+
+
+  public void encodeBegin(FacesContext context) throws IOException {
+    makeAlias(context);
+  }
+
+
+  public void encodeEnd(FacesContext context) throws IOException {
+    removeAlias();
+  }
+
+  public void queueEvent(FacesEvent event)
+    {
+        super.queueEvent(new FacesEventWrapper(event, this));
+    }
+
+    public void broadcast(FacesEvent event) throws AbortProcessingException
+    {
+        makeAlias();
+
+        if (event instanceof FacesEventWrapper)
+        {
+            FacesEvent originalEvent = ((FacesEventWrapper) event).getWrappedFacesEvent();
+            originalEvent.getComponent().broadcast(originalEvent);
+        }
+        else
+        {
+            super.broadcast(event);
+        }
+
+        removeAlias();
+    }
+
+    void makeAlias(FacesContext context)
+    {
+        _context = context;
+        makeAlias();
+    }
+
+    private void makeAlias()
+    {
+        if (! scopeSearched)
+        {
+            withinScope = getParent() instanceof AliasBeansScope;
+            if (withinScope)
+            {
+                AliasBeansScope aliasScope = (AliasBeansScope) getParent();
+                aliasScope.addAlias(alias);
+            }
+            scopeSearched = true;
+        }
+        alias.make(_context);
+    }
+
+    void removeAlias(FacesContext context)
+    {
+        _context = context;
+        removeAlias();
+    }
+
+    private void removeAlias()
+    {
+        if (! withinScope)
+            alias.remove(_context);
+    }
+
+
+    public void handleBindings()
+    {
+        makeAlias(getFacesContext());
+
+        RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(getFacesContext(),this,true);
+
+        removeAlias(getFacesContext());
+    }
+}

Propchange: myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeanTag.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeanTag.java?rev=664402&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeanTag.java (added)
+++ myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeanTag.java Sat Jun  7 14:59:02 2008
@@ -0,0 +1,132 @@
+/*
+ * 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.custom.aliasbean;
+
+import javax.el.ValueExpression;
+import javax.faces.component.UIComponent;
+import javax.faces.webapp.UIComponentELTag;
+import javax.servlet.jsp.JspException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author Sylvain Vieujot (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+public class AliasBeanTag extends UIComponentELTag
+{
+
+    private Log log = LogFactory.getLog(AliasBeanTag.class);
+    /**
+     * Construct an instance of the AliasBeanELTag.
+     */
+    public AliasBeanTag()
+    {
+    }
+    
+    public int doStartTag() throws JspException
+    {
+        int retVal= super.doStartTag();
+
+        UIComponent comp = getComponentInstance();
+
+        if(comp instanceof AliasBean)
+        {
+            ((AliasBean) comp).makeAlias(getFacesContext());
+        }
+        else
+        {
+            log.warn("associated component is no aliasBean");
+        }
+
+        return retVal;
+    }
+
+    public int doEndTag() throws JspException
+    {
+        UIComponent comp = getComponentInstance();
+
+        if(comp instanceof AliasBean)
+        {
+            ((AliasBean) comp).removeAlias(getFacesContext());
+        }
+        else
+        {
+            log.warn("associated component is no aliasBean");
+        }
+
+        return super.doEndTag();
+    }
+    
+    @Override
+    public String getComponentType()
+    {
+        return "org.apache.myfaces.AliasBean";
+    }
+
+    public String getRendererType()
+    {
+        return null;
+    }
+
+    private ValueExpression _alias;
+
+    public void setAlias(ValueExpression alias)
+    {
+        _alias = alias;
+    }
+
+    private ValueExpression _value;
+
+    public void setValue(ValueExpression value)
+    {
+        _value = value;
+    }
+
+    @Override
+    protected void setProperties(UIComponent component)
+    {
+        if (!(component instanceof AliasBean))
+        {
+            throw new IllegalArgumentException("Component "
+                    + component.getClass().getName() + " is no AliasBean");
+        }
+        AliasBean comp = (AliasBean) component;
+
+        super.setProperties(component);
+
+        if (_alias != null)
+        {
+            comp.setValueExpression("alias", _alias);
+        }
+        if (_value != null)
+        {
+            comp.setValueExpression("value", _value);
+        }
+    }
+
+    @Override
+    public void release()
+    {
+        super.release();
+        _alias = null;
+        _value = null;
+    }
+}

Propchange: myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeanTag.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeanTag.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScope.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScope.java?rev=664402&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScope.java (added)
+++ myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScope.java Sat Jun  7 14:59:02 2008
@@ -0,0 +1,288 @@
+/*
+ * 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.custom.aliasbean;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.FacesEvent;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.shared_tomahawk.util.RestoreStateUtils;
+import org.apache.myfaces.shared_tomahawk.component.BindingAware;
+
+/**
+ * Holds several aliases that are configured by aliasBean tags.
+ * <p>
+ * The aliasBean tag must enclose all the components that are within the scope
+ * of the alias. When multiple aliasas are defined, this makes the page structure
+ * very clumsy; for example defining 5 aliases means the content must be nested
+ * 5 indentation levels deep. This tag instead allows the content block to be
+ * wrapped in just one AliasBeansScope tag, and then have AliasBean tags with
+ * empty bodies added as direct children of this component. The scope of the AliasBean
+ * tag still starts when the tag begins, but instead of ending when the tag ends
+ * the scope of the nested AliasBean tags extends to the end of this component.
+ * 
+ * @JSFComponent
+ *   name = "t:aliasBeansScope"
+ *   tagClass = "org.apache.myfaces.custom.aliasbean.AliasBeansScopeTag"
+ *   
+ * @JSFJspProperty 
+ *   name = "rendered"
+ *   returnType = "boolean" 
+ *   tagExcluded = "true"
+ *   
+ * @JSFJspProperty
+ *   name = "binding"
+ *   returnType = "java.lang.String"
+ *   tagExcluded = "true"
+ *   
+ * @author Sylvain Vieujot (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+public class AliasBeansScope extends UIComponentBase implements BindingAware
+{
+    static final Log log = LogFactory.getLog(AliasBeansScope.class);
+
+    public static final String COMPONENT_TYPE = "org.apache.myfaces.AliasBeansScope";
+    public static final String COMPONENT_FAMILY = "javax.faces.Data";
+
+    private ArrayList _aliases = new ArrayList();
+    transient FacesContext _context = null;
+
+    void addAlias(Alias alias)
+    {
+        _aliases.add(alias);
+    }
+
+    public String getFamily()
+    {
+        return COMPONENT_FAMILY;
+    }
+
+    public String getRendererType() {
+      return null;
+    }
+
+  public Object saveState(FacesContext context)
+    {
+        log.debug("saveState");
+        _context = context;
+
+        return super.saveState(context);
+    }
+
+    public void restoreState(FacesContext context, Object state)
+    {
+        log.debug("restoreState");
+        _context = context;
+
+        super.restoreState(context, state);
+    }
+
+    public Object processSaveState(FacesContext context)
+    {
+        if (context == null)
+            throw new NullPointerException("context");
+        if (isTransient())
+            return null;
+
+        makeAliases(context);
+
+        Map facetMap = null;
+        for (Iterator it = getFacets().entrySet().iterator(); it.hasNext();)
+        {
+            Map.Entry entry = (Map.Entry) it.next();
+            if (facetMap == null)
+                facetMap = new HashMap();
+            UIComponent component = (UIComponent) entry.getValue();
+            if (!component.isTransient())
+            {
+                facetMap.put(entry.getKey(), component.processSaveState(context));
+            }
+        }
+
+        List childrenList = null;
+        if (getChildCount() > 0)
+        {
+            for (Iterator it = getChildren().iterator(); it.hasNext();)
+            {
+                UIComponent child = (UIComponent) it.next();
+                if (!child.isTransient())
+                {
+                    if (childrenList == null)
+                        childrenList = new ArrayList(getChildCount());
+                    childrenList.add(child.processSaveState(context));
+                }
+            }
+        }
+
+        removeAliases(context);
+
+        return new Object[]{saveState(context), facetMap, childrenList};
+    }
+
+    public void processRestoreState(FacesContext context, Object state)
+    {
+        if (context == null)
+            throw new NullPointerException("context");
+        Object myState = ((Object[]) state)[0];
+
+        restoreState(context, myState);
+
+        makeAliases(context);
+
+        Map facetMap = (Map) ((Object[]) state)[1];
+
+        for (Iterator it = getFacets().entrySet().iterator(); it.hasNext();)
+        {
+            Map.Entry entry = (Map.Entry) it.next();
+            Object facetState = facetMap.get(entry.getKey());
+            if (facetState != null)
+            {
+                ((UIComponent) entry.getValue()).processRestoreState(context, facetState);
+            }
+            else
+            {
+                context.getExternalContext().log("No state found to restore facet " + entry.getKey());
+            }
+        }
+
+        List childrenList = (List) ((Object[]) state)[2];
+        if (getChildCount() > 0)
+        {
+            int idx = 0;
+            for (Iterator it = getChildren().iterator(); it.hasNext();)
+            {
+                UIComponent child = (UIComponent) it.next();
+                Object childState = childrenList.get(idx++);
+                if (childState != null)
+                {
+                    child.processRestoreState(context, childState);
+                }
+                else
+                {
+                    context.getExternalContext().log("No state found to restore child of component " + getId());
+                }
+            }
+        }
+
+        removeAliases(context);
+    }
+
+    public void processValidators(FacesContext context)
+    {
+        log.debug("processValidators");
+        makeAliases(context);
+        super.processValidators(context);
+        removeAliases(context);
+    }
+
+    public void processDecodes(FacesContext context)
+    {
+        log.debug("processDecodes");
+        makeAliases(context);
+        super.processDecodes(context);
+        removeAliases(context);
+    }
+
+    public void processUpdates(FacesContext context)
+    {
+        log.debug("processUpdates");
+        makeAliases(context);
+        super.processUpdates(context);
+        removeAliases(context);
+    }
+
+    public void encodeBegin(FacesContext context) throws IOException
+    {
+        log.debug("encodeBegin");
+        makeAliases(context);
+    }
+
+    public void encodeEnd(FacesContext context)
+    {
+        log.debug("encodeEnd");
+        removeAliases(context);
+    }
+
+    public void queueEvent(FacesEvent event)
+    {
+        super.queueEvent(new FacesEventWrapper(event, this));
+    }
+
+    public void broadcast(FacesEvent event) throws AbortProcessingException
+    {
+        makeAliases();
+
+        if (event instanceof FacesEventWrapper)
+        {
+            FacesEvent originalEvent = ((FacesEventWrapper) event).getWrappedFacesEvent();
+            originalEvent.getComponent().broadcast(originalEvent);
+        }
+        else
+        {
+            super.broadcast(event);
+        }
+
+        removeAliases();
+    }
+
+    void makeAliases(FacesContext context)
+    {
+        _context = context;
+        makeAliases();
+    }
+
+    private void makeAliases()
+    {
+        for (Iterator i = _aliases.iterator(); i.hasNext();)
+            ((Alias) i.next()).make(_context);
+    }
+
+    void removeAliases(FacesContext context)
+    {
+        _context = context;
+        removeAliases();
+    }
+
+    private void removeAliases()
+    {
+        for (Iterator i = _aliases.iterator(); i.hasNext();)
+            ((Alias) i.next()).remove(_context);
+    }
+
+    public void handleBindings()
+    {
+        makeAliases(getFacesContext());
+
+        RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(getFacesContext(), this, true);
+
+        removeAliases(getFacesContext());
+    }
+}