You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ms...@apache.org on 2009/11/30 20:51:31 UTC

svn commit: r885567 [1/2] - in /myfaces/trinidad/branches/1.2.12.1-sanity-jsf2: ./ trinidad-api/ trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/ trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ trinidad-api/src/test/java/...

Author: mstarets
Date: Mon Nov 30 19:51:30 2009
New Revision: 885567

URL: http://svn.apache.org/viewvc?rev=885567&view=rev
Log:
Backport of JSF 2.0 changes (minues the Facelets) for JSP compatibility testing

Modified:
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/pom.xml
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/pom.xml
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/ExternalContextDecorator.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/test/java/org/apache/myfaces/trinidad/component/FindComponentTest.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/test/java/org/apache/myfaces/trinidad/convert/NumberConverterTestCase.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/test/java/org/apache/myfaces/trinidad/util/FindRelativeComponentTest.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/test/java/org/apache/myfaces/trinidadbuild/test/MockFacesContext12.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-examples/pom.xml
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/pom.xml
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewHandlerImpl.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/NumberConverter.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/AccessKeyPropertyTagRule.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/DatePropertyTagRule.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/FileDownloadActionListenerTag.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/LocalePropertyTagRule.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/ResetActionListenerTag.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/ReturnActionListenerTag.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/SetActionListenerTag.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/StringArrayPropertyTagRule.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/TrinidadComponentHandler.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/TrinidadConverterHandler.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/TrinidadFaceletViewHandler.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/TrinidadListenersTagRule.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/TrinidadValidatorHandler.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/ValueExpressionTagRule.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/context/PartialTriggersTest.java
    myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MApplication.java

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/pom.xml?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/pom.xml (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/pom.xml Mon Nov 30 19:51:30 2009
@@ -20,8 +20,8 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
-  <name>Apache MyFaces Trinidad 1.2</name>
-  <description>Apache MyFaces Trinidad for JSF 1.2</description>
+  <name>Apache MyFaces Trinidad 2.0</name>
+  <description>Apache MyFaces Trinidad for JSF 2.0</description>
   <url>http://myfaces.apache.org/trinidad/trinidad-1_2</url>
   <inceptionYear>2001</inceptionYear>
 
@@ -38,15 +38,17 @@
 
   <properties>
     <!-- Standards -->
-    <jdk.version>1.5</jdk.version>    
+    <jdk.version>1.6</jdk.version>    
     <servlet.version>2.5</servlet.version>
     <portlet.version>2.0</portlet.version>
+    <validation.version>1.0.0.GA</validation.version>
     <jsp.version>2.1</jsp.version>
     <jstl.version>1.2</jstl.version>
     <jsf-spec.version>1.2</jsf-spec.version>
-    <jsf-ri.version>1.2_09</jsf-ri.version>
-    <jsf-myfaces.version>1.2.4</jsf-myfaces.version>
-    <jsf-facelets.version>1.1.14</jsf-facelets.version>
+    <jsf-ri.version>2.0.1</jsf-ri.version>
+    <!--jsf-ri.version>2.0.0-b22</jsf-ri.version-->
+    <!--jsf-myfaces.version>1.2.4</jsf-myfaces.version>
+    <jsf-facelets.version>1.1.14</jsf-facelets.version-->
     <portlet-bridge.version>1.0.0-beta</portlet-bridge.version>
     <commons-lang.version>2.4</commons-lang.version>
     <pluto-embedded.version>1.0.1</pluto-embedded.version>
@@ -136,9 +138,9 @@
   </mailingLists>
 
   <scm>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/trinidad/tags/trinidad-1.2.12</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/trinidad/tags/trinidad-1.2.12</developerConnection>
-    <url>http://svn.apache.org/viewcvs.cgi/myfaces/trinidad/tags/trinidad-1.2.12</url>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/trinidad/trunk/</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/trinidad/trunk/</developerConnection>
+    <url>http://svn.apache.org/viewcvs.cgi/myfaces/trinidad/trunk/</url>
   </scm>
 
   <repositories>
@@ -153,6 +155,13 @@
       <name>Apache Snapshot Repository</name>
       <url>http://people.apache.org/repo/m2-snapshot-repository</url>
     </repository>
+    <!-- needed for Bean Validation API -->
+    <repository>
+      <id>jboss releases</id>
+      <name>JBoss Releases</name>
+      <url>http://repository.jboss.org/maven2/</url>
+      <layout>default</layout>
+    </repository>
   </repositories>
 
   <pluginRepositories>
@@ -208,20 +217,28 @@
       </dependency>
       
       <dependency>
-        <groupId>javax.faces</groupId>
+        <groupId>com.sun.faces</groupId>
         <artifactId>jsf-api</artifactId>
         <version>${jsf-ri.version}</version>
         <scope>provided</scope>
       </dependency>
 
       <dependency>
-        <groupId>javax.faces</groupId>
+        <groupId>com.sun.faces</groupId>
         <artifactId>jsf-impl</artifactId>
         <version>${jsf-ri.version}</version>
         <scope>provided</scope>
       </dependency>
 
       <dependency>
+        <groupId>javax.validation</groupId>
+        <artifactId>validation-api</artifactId>
+        <version>${validation.version}</version>
+        <scope>compile</scope>
+      </dependency>
+
+<!-- for now we just use the RI, b/c nothing around for MyFaces 2.0 -->
+      <!--dependency>
         <groupId>org.apache.myfaces.core</groupId>
         <artifactId>myfaces-api</artifactId>
         <version>${jsf-myfaces.version}</version>
@@ -233,7 +250,7 @@
         <artifactId>myfaces-impl</artifactId>
         <version>${jsf-myfaces.version}</version>
         <scope>provided</scope>
-      </dependency>
+      </dependency-->
 
       <dependency>
         <groupId>org.apache.myfaces.portlet-bridge</groupId>
@@ -250,12 +267,12 @@
         <scope>provided</scope>
       </dependency>
       
-      <dependency>
+      <!--dependency>
         <groupId>com.sun.facelets</groupId>
         <artifactId>jsf-facelets</artifactId>
         <version>${jsf-facelets.version}</version>
         <scope>provided</scope>
-      </dependency>
+      </dependency-->
 
       <dependency>
         <groupId>commons-lang</groupId>
@@ -721,7 +738,7 @@
             <scope>runtime</scope>
           </dependency>
 
-          <dependency>
+          <!--dependency>
             <groupId>org.apache.myfaces.core</groupId>
             <artifactId>myfaces-api</artifactId>
             <version>${jsf-myfaces.version}</version>
@@ -733,7 +750,7 @@
             <artifactId>myfaces-impl</artifactId>
             <version>${jsf-myfaces.version}</version>
             <scope>runtime</scope>
-          </dependency>
+          </dependency-->
         </dependencies>
       </dependencyManagement>
     </profile>
@@ -807,6 +824,5 @@
   </profiles>
 </settings>
       -->
-
   </profiles>
 </project>

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/pom.xml?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/pom.xml (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/pom.xml Mon Nov 30 19:51:30 2009
@@ -56,14 +56,26 @@
     </dependency>
 
     <dependency>
+      <groupId>javax.validation</groupId>
+      <artifactId>validation-api</artifactId>
+    </dependency>
+
+
+    <dependency>
       <groupId>org.apache.myfaces.portlet-bridge</groupId>
       <artifactId>portlet-bridge-api</artifactId>
     </dependency>
 
-    <dependency>
+    <!--dependency>
       <groupId>org.apache.myfaces.core</groupId>
       <artifactId>myfaces-api</artifactId>
-      <scope>provided</scope> <!-- force provided scope here -->
+      <scope>provided</scope> 
+    </dependency-->
+    
+    <dependency>
+      <groupId>com.sun.faces</groupId>
+      <artifactId>jsf-api</artifactId>
+      <scope>provided</scope> 
     </dependency>
 
     <!-- "test" scope dependencies -->

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/ExternalContextDecorator.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/ExternalContextDecorator.java?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/ExternalContextDecorator.java (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/ExternalContextDecorator.java Mon Nov 30 19:51:30 2009
@@ -30,277 +30,18 @@
 import java.util.Map;
 
 import javax.faces.context.ExternalContext;
+import javax.faces.context.ExternalContextWrapper;
 
 
 /**
  * Base class for decorating ExternalContexts.
  *
  */
-abstract public class ExternalContextDecorator extends ExternalContext
+abstract public class ExternalContextDecorator extends ExternalContextWrapper
 {
-  @Override
-  public void dispatch(String path) throws IOException
+  public ExternalContext getWrapped()
   {
-    getExternalContext().dispatch(path);
-  }
-
-  @Override
-  public Object getContext()
-  { 
-    return getExternalContext().getContext();
-  }
-  
-  @Override
-  public Object getRequest()
-  {
-    return getExternalContext().getRequest(); 
-  }
-  
-  @Override
-  public String getRequestCharacterEncoding()
-  {
-    return getExternalContext().getRequestCharacterEncoding(); 
-  }
-  
-  @Override
-  public String getRequestContentType()
-  {
-    return getExternalContext().getRequestContentType(); 
-  }
-  
-  @Override
-  public Object getResponse()
-  {
-    return getExternalContext().getResponse();
-  }
-  
-  @Override
-  public String getResponseCharacterEncoding()
-  {
-    return getExternalContext().getResponseCharacterEncoding(); 
-  }
-  
-  @Override
-  public String getResponseContentType()
-  {
-    return getExternalContext().getResponseContentType(); 
-  }
-  
-  @Override
-  public Object getSession(boolean create)
-  {
-    return getExternalContext().getSession(create);
-  }
-  
-  @Override
-  public String getRequestContextPath()
-  {
-    return getExternalContext().getRequestContextPath();
-  }
-
-  @Override
-  public String getRequestPathInfo()
-  {
-    return getExternalContext().getRequestPathInfo();
-  }
-
-  @Override
-  public String getRequestServletPath()
-  {
-    return getExternalContext().getRequestServletPath();
-  }
-
-  @Override
-  public String getInitParameter(String name)
-  {
-    return getExternalContext().getInitParameter(name);
-  }
-  
-  @Override
-  public String encodeResourceURL(String url)
-  {
-    return getExternalContext().encodeResourceURL(url);
-  }
-
-  @Override
-  public String encodeActionURL(String url)
-  {
-    return getExternalContext().encodeActionURL(url);
-  }
-
-  @Override
-  public String encodeNamespace(String ns)
-  {
-    return getExternalContext().encodeNamespace(ns);
-  }
-
-  @Override
-  public String getAuthType()
-  {
-    return getExternalContext().getAuthType();
-  }
-
-  @Override
-  public String getRemoteUser()
-  {
-    return getExternalContext().getRemoteUser();
-  }
-
-  @Override
-  public Principal getUserPrincipal()
-  {
-    return getExternalContext().getUserPrincipal();
-  }
-
-  @Override
-  public boolean isUserInRole(String role)
-  {
-    return getExternalContext().isUserInRole(role);
-  }
-
-  @Override
-  public URL getResource(String path) throws MalformedURLException
-  {
-    return getExternalContext().getResource(path);
-  }
-
-  @Override
-  public InputStream getResourceAsStream(String path)
-  {
-    return getExternalContext().getResourceAsStream(path);
-  }
-
-  @SuppressWarnings("unchecked")
-  @Override
-  public Set getResourcePaths(String path)
-  {
-    return getExternalContext().getResourcePaths(path);
-  }
-
-  @SuppressWarnings("unchecked")
-  @Override
-  public Map getRequestParameterMap()
-  {
-    return getExternalContext().getRequestParameterMap();
-  }
-
-  @SuppressWarnings("unchecked")
-  @Override
-  public Map getRequestParameterValuesMap()
-  {
-    return getExternalContext().getRequestParameterValuesMap();
-  }
-
-  @SuppressWarnings("unchecked")
-  @Override
-  public Iterator getRequestParameterNames()
-  {
-    return getExternalContext().getRequestParameterNames();
-  }
-
-  @SuppressWarnings("unchecked")
-  @Override
-  public Map getRequestCookieMap()
-  {
-    return getExternalContext().getRequestCookieMap();
-  }
-
-  @SuppressWarnings("unchecked")
-  @Override
-  public Map getRequestHeaderMap()
-  {
-    return getExternalContext().getRequestHeaderMap();
-  }
-
-  @SuppressWarnings("unchecked")
-  @Override
-  public Map getRequestHeaderValuesMap()
-  {
-    return getExternalContext().getRequestHeaderValuesMap();
-  }
-
-  @SuppressWarnings("unchecked")
-  @Override
-  public Map getInitParameterMap()
-  {
-    return getExternalContext().getInitParameterMap();
-  }
-
-  @SuppressWarnings("unchecked")
-  @Override
-  public Map getApplicationMap()
-  {
-    return getExternalContext().getApplicationMap();
-  }
-
-  @SuppressWarnings("unchecked")
-  @Override
-  public Map getSessionMap()
-  {
-    return getExternalContext().getSessionMap();
-  }
-
-  @SuppressWarnings("unchecked")
-  @Override
-  public Map getRequestMap()
-  {
-    return getExternalContext().getRequestMap();
-  }
-
-  @Override
-  public Locale getRequestLocale()
-  {
-    return getExternalContext().getRequestLocale();
-  }
-
-  @Override
-  public void setRequest(Object request)
-  {
-    getExternalContext().setRequest(request);
-  }
-
-  @SuppressWarnings("unchecked")
-  @Override
-  public void setRequestCharacterEncoding(String encoding) throws UnsupportedEncodingException 
-  {
-    getExternalContext().setRequestCharacterEncoding(encoding);
-  }
-
-  @Override
-  public void setResponse(Object response)
-  {
-    getExternalContext().setResponse(response);
-  }
-
-  @Override
-  public void setResponseCharacterEncoding(String encoding)
-  {
-    getExternalContext().setResponseCharacterEncoding(encoding);
-  }
-
-  @SuppressWarnings("unchecked")
-  @Override
-  public Iterator getRequestLocales()
-  {
-    return getExternalContext().getRequestLocales();
-  }
-
-  @Override
-  public void log(String message)
-  {
-    getExternalContext().log(message);
-  }
-
-  @Override
-  public void log(String message, Throwable t)
-  {
-    getExternalContext().log(message, t);
-  }
-
-  @Override
-  public void redirect(String url) throws IOException
-  {
-    getExternalContext().redirect(url);
+    return getExternalContext();
   }
 
   abstract protected ExternalContext getExternalContext();

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java Mon Nov 30 19:51:30 2009
@@ -282,7 +282,7 @@
       
       if (typeIdx == _PATTERN_TYPE)
       {
-        // We call this since the pattern may contain the generic currency sign '¤', which we don't 
+        // We call this since the pattern may contain the generic currency sign, which we don't 
         // want to display to the user.
         pattern = getLocalizedPattern(context, pattern, dfs);
         
@@ -750,7 +750,7 @@
   }
 
   /**
-   * If <code>pattern</code> contains the generic currency sign '¤', this method will replace it 
+   * If <code>pattern</code> contains the generic currency sign, this method will replace it 
    * with the localized currency symbol (if one exists). 
    * @param context the FacesContext
    * @param pattern the pattern to be localized
@@ -762,13 +762,13 @@
     if (pattern == null)
       return null;
     
-    // If the pattern contains the generic currency sign '¤', replace it with the localized 
+    // If the pattern contains the generic currency sign, replace it with the localized 
     // currency symbol (if one exists), so that when the pattern is displayed (such as in an error 
     // message), it is more meaningful to the user.
-    // If the pattern contains '¤¤', replace it with the international currency symbol. 
+    // If the pattern contains double international currency symbol, replace it with the international currency symbol. 
     // For an explanation of this behavior, see section "Special Pattern Characters" at: 
     // http://java.sun.com/javase/6/docs/api/java/text/DecimalFormat.html
-    // The unicode for '¤' is: \u00A4
+    // The unicode for the international currency symbol is: \u00A4
     // The xml hex is        : &#xA4;
     int idx = pattern.indexOf('\u00A4');
     if (idx == -1)

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/test/java/org/apache/myfaces/trinidad/component/FindComponentTest.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/test/java/org/apache/myfaces/trinidad/component/FindComponentTest.java?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/test/java/org/apache/myfaces/trinidad/component/FindComponentTest.java (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/test/java/org/apache/myfaces/trinidad/component/FindComponentTest.java Mon Nov 30 19:51:30 2009
@@ -23,13 +23,15 @@
 import javax.faces.component.UIForm;
 import javax.faces.component.UIViewRoot;
 
+import javax.faces.context.FacesContext;
+
 import junit.framework.Test;
-import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
 import org.apache.myfaces.trinidad.component.UIXPanel;
+import org.apache.myfaces.trinidadbuild.test.FacesTestCase;
 
-public class FindComponentTest extends TestCase
+public class FindComponentTest extends FacesTestCase
 {
   public static final Test suite()
   {
@@ -156,6 +158,7 @@
     UIXPanel g = new UIXPanel(); g.setId("g");
     UIXPanel h = new UIXPanel(); h.setId("h");
     UIXPanel i = new UIXPanel(); i.setId("i");
+ 
     a.getChildren().add(b);
     a.getChildren().add(c);
     b.getChildren().add(d);

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/test/java/org/apache/myfaces/trinidad/convert/NumberConverterTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/test/java/org/apache/myfaces/trinidad/convert/NumberConverterTestCase.java?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/test/java/org/apache/myfaces/trinidad/convert/NumberConverterTestCase.java (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/test/java/org/apache/myfaces/trinidad/convert/NumberConverterTestCase.java Mon Nov 30 19:51:30 2009
@@ -217,28 +217,7 @@
     }
   }
 
-//  public void testFranceLocale()
-//  {
-//    NumberConverter converter = getNumberConverter();
-//    Mock mock = mock(UIComponent.class);
-//    UIComponent comp = (UIComponent) mock.proxy();
-//    
-//    converter.setLocale(Locale.FRANCE);
-//    converter.setType("currency");
-//    Double d = new Double(12345.68d);
-//    
-//    setFacesContext(facesContext);
-//    try
-//    {
-//      String convertedString = converter.getAsString(facesContext, comp, d);
-//      assertEquals("12 345,68 €", convertedString);
-//    }
-//    finally
-//    {
-//      setFacesContext(null);
-//    }
-//    mock.verify();
-//  }
+
   
   public void testCurrencyCodeIsHonoured()
   {
@@ -579,4 +558,4 @@
 // Pattern             tested
 // Type                tested
 // GroupingUsed        tested
-// IntegerOnly         tested   // only while parsing
\ No newline at end of file
+// IntegerOnly         tested   // only while parsing

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/test/java/org/apache/myfaces/trinidad/util/FindRelativeComponentTest.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/test/java/org/apache/myfaces/trinidad/util/FindRelativeComponentTest.java?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/test/java/org/apache/myfaces/trinidad/util/FindRelativeComponentTest.java (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/test/java/org/apache/myfaces/trinidad/util/FindRelativeComponentTest.java Mon Nov 30 19:51:30 2009
@@ -18,7 +18,6 @@
  */
 package org.apache.myfaces.trinidad.util;
 
-import junit.framework.TestCase;
 
 import javax.faces.component.NamingContainer;
 import javax.faces.component.UIComponent;
@@ -31,8 +30,9 @@
 import org.apache.myfaces.trinidad.component.UIXInput;
 import org.apache.myfaces.trinidad.component.UIXPanel;
 import org.apache.myfaces.trinidad.component.UIXTable;
+import org.apache.myfaces.trinidadbuild.test.FacesTestCase;
 
-public class FindRelativeComponentTest extends TestCase
+public class FindRelativeComponentTest extends FacesTestCase
 {
   public static final Test suite()
   {

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/test/java/org/apache/myfaces/trinidadbuild/test/MockFacesContext12.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/test/java/org/apache/myfaces/trinidadbuild/test/MockFacesContext12.java?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/test/java/org/apache/myfaces/trinidadbuild/test/MockFacesContext12.java (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-api/src/test/java/org/apache/myfaces/trinidadbuild/test/MockFacesContext12.java Mon Nov 30 19:51:30 2009
@@ -18,14 +18,27 @@
  */
 package org.apache.myfaces.trinidadbuild.test;
 
+import java.util.Collection;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
 import javax.el.ELContext;
 
 import javax.faces.application.Application;
+import javax.faces.application.ApplicationWrapper;
 import javax.faces.context.ExternalContext;
 import javax.faces.context.FacesContext;
+import javax.faces.context.PartialResponseWriter;
+import javax.faces.context.PartialViewContext;
+import javax.faces.event.PhaseId;
+import javax.faces.event.SystemEvent;
 import javax.faces.lifecycle.Lifecycle;
 
 import org.apache.shale.test.mock.MockFacesContext;
+import org.apache.shale.test.mock.MockApplication12;
+
 
 public class MockFacesContext12 extends MockFacesContext
 {
@@ -36,12 +49,14 @@
     super(ec, lifecycle);
     elContext = createELContext(application);
     elContext.putContext(FacesContext.class, this);
+    _app = application;
   }
 
   public MockFacesContext12(Application application)
   {
     elContext = createELContext(application);
     elContext.putContext(FacesContext.class, this);
+    _app = application;
   }
 
   public ELContext getELContext()
@@ -53,6 +68,104 @@
   {
     return new MockELContext(application);
   }
+  
+  public Map<Object,Object> getAttributes()
+  {
+    return _attrs;
+  }
+  
+  public PartialViewContext getPartialViewContext()
+  {
+    return _mockPartialContext;
+  }
+  
+  public Application getApplication()
+  {
+    return new ApplicationWrapper()
+    {
+      public Application getWrapped()  
+      {
+        return _app;
+      }
+      public void publishEvent(FacesContext context,
+                               Class<? extends SystemEvent> systemEventClass,
+                               Class<?> sourceBaseType,
+                               Object source)
+      {
+        // do nothing
+      }
+      
+      public void publishEvent(FacesContext context,
+                               Class<? extends SystemEvent> systemEventClass,
+                               Object source)
+      {
+        //do nothing
+      }
+    };
+  }
 
   protected MockELContext elContext;
-}
\ No newline at end of file
+  
+  
+  private final PartialViewContext _mockPartialContext = new MockPartialViewContext();
+  private final Map<Object, Object> _attrs = new HashMap<Object, Object>();
+  private Application _app;
+  
+  private static class MockPartialViewContext extends PartialViewContext
+  {
+    public Collection<String> getExecuteIds()
+    {
+      throw new UnsupportedOperationException();
+    }
+    
+    public Collection<String> getRenderIds()
+    {
+      throw new UnsupportedOperationException();
+    }
+    
+    public PartialResponseWriter getPartialResponseWriter()
+    {
+      throw new UnsupportedOperationException();
+    }
+    
+    public boolean isAjaxRequest()
+    {
+      return false;
+    }
+    
+    public boolean isPartialRequest()
+    {
+      return false;
+    }
+    
+    public boolean isExecuteAll()
+    {
+      throw new UnsupportedOperationException();
+    }
+    
+    public boolean isRenderAll()
+    {
+      throw new UnsupportedOperationException();
+    }
+    
+    public void setRenderAll(boolean renderAll)
+    {
+      throw new UnsupportedOperationException();
+    }
+    
+    public void setPartialRequest(boolean isPartialRequest)
+    {
+      throw new UnsupportedOperationException();
+    }
+    
+    public void release()
+    {
+      throw new UnsupportedOperationException();
+    }
+    
+    public void processPartial(PhaseId phaseId)
+    {
+      throw new UnsupportedOperationException();
+    }
+  }
+}

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-examples/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-examples/pom.xml?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-examples/pom.xml (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-examples/pom.xml Mon Nov 30 19:51:30 2009
@@ -129,7 +129,7 @@
             <scope>runtime</scope>
           </dependency-->
 
-          <dependency>
+          <!--dependency>
             <groupId>org.apache.myfaces.core</groupId>
             <artifactId>myfaces-api</artifactId>
             <scope>compile</scope>
@@ -139,7 +139,8 @@
             <groupId>org.apache.myfaces.core</groupId>
             <artifactId>myfaces-impl</artifactId>
             <scope>runtime</scope>
-          </dependency>
+          </dependency-->
+          
          </dependencies>
        </dependencyManagement>
      </profile>
@@ -150,13 +151,16 @@
       flag.  To invoke this profile, simply do not include a -Djsf= property on your maven
       command line.  Execute this profile like this:
       
+      mstarets - The default has been temporarily changed to JSF RI
+      TODO: Restore old profile activation rules after we can build with myfaces
+      
       mvn -PjettyConfig jetty:run
     -->    
     <profile>
       <id>myfaces</id>
       <activation>
         <property>
-          <name>!jsf</name>
+          <name>myfaces</name>
         </property>
       </activation>
       <dependencies>
@@ -169,6 +173,7 @@
           <artifactId>myfaces-impl</artifactId>
         </dependency>
       </dependencies>
+      
     </profile>
 
     <!--
@@ -183,17 +188,16 @@
       <id>jsfri</id>
       <activation>
         <property>
-          <name>jsf</name>
-          <value>ri</value>
+          <name>!myfaces</name>
         </property>
       </activation>
       <dependencies>
         <dependency>
-          <groupId>javax.faces</groupId>
+          <groupId>com.sun.faces</groupId>
           <artifactId>jsf-api</artifactId>
         </dependency>
         <dependency>
-          <groupId>javax.faces</groupId>
+          <groupId>com.sun.faces</groupId>
           <artifactId>jsf-impl</artifactId>
         </dependency>
       </dependencies>      

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/pom.xml?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/pom.xml (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/pom.xml Mon Nov 30 19:51:30 2009
@@ -60,10 +60,16 @@
       <artifactId>jstl</artifactId>
     </dependency>
 
-    <dependency>
+    <!--dependency>
       <groupId>org.apache.myfaces.core</groupId>
       <artifactId>myfaces-api</artifactId>
-      <scope>provided</scope> <!-- force provided scope here -->
+      <scope>provided</scope> 
+    </dependency-->
+    
+    <dependency>
+      <groupId>com.sun.faces</groupId>
+      <artifactId>jsf-api</artifactId>
+      <scope>provided</scope> 
     </dependency>
 
     <dependency>
@@ -76,10 +82,10 @@
       <artifactId>trinidad-api</artifactId>
     </dependency>
 
-    <dependency>
+    <!--dependency>
       <groupId>com.sun.facelets</groupId>
       <artifactId>jsf-facelets</artifactId>
-    </dependency>
+    </dependency-->
 
     <!-- "test" scope dependencies -->
     <dependency>
@@ -115,11 +121,11 @@
       <scope>test</scope>
     </dependency>
 
-    <dependency>
+    <!--dependency>
       <groupId>org.apache.myfaces.core</groupId>
       <artifactId>myfaces-impl</artifactId>
-      <scope>test</scope> <!-- getting web-facesconfig dtd from myfaces impl for unit tests -->
-    </dependency>
+      <scope>test</scope>
+    </dependency-->
 
   </dependencies>
 

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java Mon Nov 30 19:51:30 2009
@@ -46,7 +46,6 @@
 import org.apache.myfaces.trinidadinternal.util.SubKeyMap;
 import org.apache.myfaces.trinidadinternal.util.TokenCache;
 
-import com.sun.facelets.FaceletViewHandler;
 
 import java.io.ByteArrayOutputStream;
 import java.io.ObjectOutputStream;
@@ -132,7 +131,7 @@
   }
   
   @Override
-  protected StateManager getWrapped()
+  public StateManager getWrapped()
   {
     return _delegate;
   }
@@ -970,12 +969,13 @@
   {
     if (_structureGeneratedByTemplate == null)
     {
+      // TODO: Partial State Saving
       ExternalContext external = context.getExternalContext();
-      String restoreMode = external.getInitParameter(
+      /*String restoreMode = external.getInitParameter(
         FaceletViewHandler.PARAM_BUILD_BEFORE_RESTORE);
       if ("true".equals(restoreMode))
         _structureGeneratedByTemplate = Boolean.TRUE;
-      else
+      else*/
         _structureGeneratedByTemplate = Boolean.FALSE;
     }
 

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewHandlerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewHandlerImpl.java?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewHandlerImpl.java (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewHandlerImpl.java Mon Nov 30 19:51:30 2009
@@ -42,6 +42,8 @@
 import javax.faces.context.ExternalContext;
 import javax.faces.context.FacesContext;
 
+import javax.faces.view.ViewDeclarationLanguage;
+
 import org.apache.myfaces.trinidad.context.RequestContext;
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 import org.apache.myfaces.trinidad.render.ExtendedRenderKitService;
@@ -77,10 +79,25 @@
     _loadInternalViews();
   }
 
-  protected ViewHandler getWrapped()
+  public ViewHandler getWrapped()
   {
     return _delegate;
   }
+  
+  @Override
+  public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context,
+                                                            String viewId)
+  {
+    // InternalViews will not use ViewDeclarationLanguage processors,
+    // since they do essentially the same job themselves.
+    InternalView internal = _getInternalView(context, viewId);
+    if (internal != null)
+    {
+      return null;
+    }
+    return _delegate.getViewDeclarationLanguage(context, viewId);
+  }
+
 
   @Override
   public UIViewRoot createView(FacesContext context, String viewId)

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java Mon Nov 30 19:51:30 2009
@@ -19,6 +19,11 @@
 package org.apache.myfaces.trinidadinternal.context;
 
 import java.io.IOException;
+
+import java.net.MalformedURLException;
+
+import java.net.URL;
+
 import java.util.Iterator;
 import java.util.Map;
 
@@ -266,6 +271,18 @@
 
       super.dispatch(path);
     }
+    
+    @Override
+    public URL getResource(String path)
+                             throws MalformedURLException
+    {
+      RequestContext afc = RequestContext.getCurrentInstance();
+      if (afc != null)
+      {
+        path = afc.getPageResolver().getPhysicalURI(path);
+      }
+      return super.getResource(path);
+    }
 
 
     @Override

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/NumberConverter.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/NumberConverter.java?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/NumberConverter.java (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/NumberConverter.java Mon Nov 30 19:51:30 2009
@@ -147,7 +147,7 @@
     else
       params = new Object[4];
 
-    // We call this since the pattern may contain the generic currency sign '¤', which we don't 
+    // We call this since the pattern may contain the generic currency sign, which we don't 
     // want to display to the user.
     params[0] = getLocalizedPattern(context, getPattern(), null);
 

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/AccessKeyPropertyTagRule.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/AccessKeyPropertyTagRule.java?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/AccessKeyPropertyTagRule.java (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/AccessKeyPropertyTagRule.java Mon Nov 30 19:51:30 2009
@@ -1,163 +0,0 @@
-/*
- *  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.trinidadinternal.facelets;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.tag.Metadata;
-import com.sun.facelets.tag.MetadataTarget;
-import com.sun.facelets.tag.MetaRule;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.TagAttributeException;
-
-import javax.el.ValueExpression;
-
-import org.apache.myfaces.trinidad.bean.FacesBean;
-import org.apache.myfaces.trinidad.bean.PropertyKey;
-import org.apache.myfaces.trinidad.component.UIXComponent;
-import org.apache.myfaces.trinidadinternal.taglib.util.VirtualAttributeUtils;
-import org.apache.myfaces.trinidadinternal.util.nls.StringUtils;
-
-/**
- * 
- * @version $Id: StringArrayPropertyTagRule.java,v 1.1 2005/08/23 05:54:54 adamwiner Exp $
- */
-final class AccessKeyPropertyTagRule extends MetaRule
-{
-  public static final MetaRule Instance = new AccessKeyPropertyTagRule();
-
-  /**
-   * Metadata for non-literal "AndAccessKey" attributes
-   */
-  private static class AccessKeyMetadata extends Metadata
-  {
-    public AccessKeyMetadata(
-      String mainMethodName, 
-      TagAttribute attribute)
-    {
-      _mainMethodName = mainMethodName;
-      _attribute = attribute;
-    }
-    
-    @Override
-    @SuppressWarnings("deprecation")
-    public void applyMetadata(FaceletContext ctx, Object instance)
-    {
-      ValueExpression expr = _attribute.getValueExpression(ctx, String.class);
-      UIXComponent uixcomp = (UIXComponent) instance;
-      FacesBean bean = uixcomp.getFacesBean();
-      PropertyKey mainKey = bean.getType().findKey(_mainMethodName);
-      if (mainKey == null)
-        throw new TagAttributeException(_attribute,
-                                        "No support for '" + _mainMethodName +
-                                        "' attribute on " + instance);
-      PropertyKey accessKeyKey = bean.getType().findKey("accessKey");
-      if (accessKeyKey == null)
-        throw new TagAttributeException(_attribute,
-                                        "No support for 'accessKey' attribute on " + instance);
-      VirtualAttributeUtils.setAccessKeyAttribute(bean, expr, mainKey, accessKeyKey);
-    }
-
-    private final String       _mainMethodName;
-    private final TagAttribute _attribute;
-  }
-
-  /**
-   * Metadata for literal (non-EL) "AndAccessKey" attributes
-   */
-  private static class LiteralAccessKeyMetadata extends Metadata
-  {
-    public LiteralAccessKeyMetadata(
-      Method mainMethod, 
-      Method accessKeyMethod, 
-      TagAttribute attribute)
-    {
-      _mainMethod = mainMethod;
-      _accessKeyMethod = accessKeyMethod;
-
-      String text = attribute.getValue();
-
-      int accessKeyIndex = StringUtils.getMnemonicIndex(text);
-      if (accessKeyIndex != StringUtils.MNEMONIC_INDEX_NONE)
-      {
-        _accessKey = Character.valueOf(text.charAt(accessKeyIndex + 1));
-        text = StringUtils.stripMnemonic(text);
-      }
-      else
-      {
-        _accessKey = null;
-      }
-      
-      _text = text;
-      _attribute = attribute;
-    }
-    
-    @Override
-    public void applyMetadata(FaceletContext ctx, Object instance)
-    {
-      try
-      {
-        if (_accessKey != null)
-          _accessKeyMethod.invoke(instance, _accessKey);
-        _mainMethod.invoke(instance, _text);
-      }
-      catch (InvocationTargetException e)
-      {
-        throw new TagAttributeException(_attribute, e.getCause());
-      }
-      catch (Exception e)
-      {
-        throw new TagAttributeException(_attribute, e);
-      }
-    }
-
-    private final Method       _mainMethod;
-    private final Method       _accessKeyMethod; 
-    private final TagAttribute _attribute;
-    private final String       _text;
-    private final Character    _accessKey;
-  }
-   
-
-  @Override
-  public Metadata applyRule(
-     String name,
-     TagAttribute attribute,
-     MetadataTarget meta)
-  {
-    if (name.endsWith("AndAccessKey"))
-    {
-      String mainProperty = name.substring(0, name.length() - "AndAccessKey".length());
-      Method mainM = meta.getWriteMethod(mainProperty);
-      Method accessKeyM = meta.getWriteMethod("accessKey");
-      
-      // if the property is writable
-      if ((mainM != null) && (accessKeyM != null))
-      {
-        if (attribute.isLiteral())
-          return new LiteralAccessKeyMetadata(mainM, accessKeyM, attribute);
-        else
-          return new AccessKeyMetadata(mainProperty, attribute);
-      }
-    }
-    return null;
-  }
-}

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/DatePropertyTagRule.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/DatePropertyTagRule.java?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/DatePropertyTagRule.java (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/DatePropertyTagRule.java Mon Nov 30 19:51:30 2009
@@ -1,154 +0,0 @@
-/*
- *  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.trinidadinternal.facelets;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.tag.MetaRule;
-import com.sun.facelets.tag.Metadata;
-import com.sun.facelets.tag.MetadataTarget;
-import com.sun.facelets.tag.TagAttribute;
-
-import com.sun.facelets.tag.TagAttributeException;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import java.text.DateFormat;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-
-import java.util.Calendar;
-import java.util.Date;
-import java.util.TimeZone;
-
-
-import org.apache.myfaces.trinidad.context.RequestContext;
-import org.apache.myfaces.trinidad.logging.TrinidadLogger;
-
-class DatePropertyTagRule
-  extends MetaRule
-{
-  static DatePropertyTagRule Instance = new DatePropertyTagRule();
-  
-  private static class LiteralPropertyMetadata extends Metadata
-  {
-    public LiteralPropertyMetadata(Method method, TagAttribute attribute,
-                                   boolean adjustToEnd)
-    {
-      _method = method;
-      _attribute = attribute;
-      _adjustToEnd = adjustToEnd;
-    }
-    
-    public void applyMetadata(FaceletContext ctx, Object instance)
-    {
-      if (_params == null)
-      {
-        Date date = _coerceToDate(_attribute.getValue(), _adjustToEnd);
-        _params = new Object[]{date};
-      }
-      try
-      {
-        _method.invoke(instance, _params);
-      }
-      catch (InvocationTargetException e)
-      {
-        throw new TagAttributeException(_attribute, e.getCause());
-      }
-      catch (Exception e)
-      {
-        throw new TagAttributeException(_attribute, e);
-      }
-    }
-    
-    private final Method       _method;
-    private final TagAttribute _attribute;
-    private final boolean      _adjustToEnd;
-    private       Object[]     _params;
-  }
-  
-  public Metadata applyRule(String name, TagAttribute attribute,
-                            MetadataTarget meta)
-  {
-    if (meta.getPropertyType(name) == _DATE_TYPE && attribute.isLiteral())
-    {
-      Method m = meta.getWriteMethod(name);
-      
-      // if the property is writable
-      if (m != null)
-      {
-        return new LiteralPropertyMetadata(m, attribute, _MAX_VALUE.equals(name));
-      }
-    }
-    
-    return null;
-  }
-  
-  static private Date _coerceToDate(String str, boolean adjustToEnd)
-  {
-    if (str == null)
-      return null;
-    
-    try
-    {
-      Date date = _getDateFormat().parse(str);
-      
-      // This code is taken from UIXComponentELTag
-      // We should probably not do the ajustment here,
-      // but instead be smarter when days are compared.
-      if (adjustToEnd)
-      {
-        Calendar c = Calendar.getInstance();
-        TimeZone tz = RequestContext.getCurrentInstance().getTimeZone();
-        if (tz != null)
-          c.setTimeZone(tz);
-        c.setTime(date);
-        // Original value had 00:00:00 for hours,mins, seconds now maximize those
-        // to get the latest time value for the date supplied.
-        c.set (Calendar.HOUR_OF_DAY, 23);
-        c.set (Calendar.MINUTE, 59);
-        c.set (Calendar.SECOND, 59);
-        c.set (Calendar.MILLISECOND, 999);
-      }
-      
-      return date;
-    }
-    catch (ParseException pe)
-    {
-      _LOG.info("CANNOT_PARSE_VALUE_INTO_DATE", str);
-      return null;
-    }
-  }
-  
-  // We rely strictly on ISO 8601 formats
-  private static DateFormat _getDateFormat()
-  {
-    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-    TimeZone tz = RequestContext.getCurrentInstance().getTimeZone();
-    if (tz != null)
-      sdf.setTimeZone(tz);
-    return sdf;
-  }
-  
-  static private final Class<? extends Date> _DATE_TYPE = Date.class;
-  static private final String _MAX_VALUE = "maxValue";
-  
-  static private final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(DatePropertyTagRule.class);
-}

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/FileDownloadActionListenerTag.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/FileDownloadActionListenerTag.java?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/FileDownloadActionListenerTag.java (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/FileDownloadActionListenerTag.java Mon Nov 30 19:51:30 2009
@@ -1,103 +0,0 @@
-/*
- *  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.trinidadinternal.facelets;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import javax.el.ELException;
-import javax.el.MethodExpression;
-import javax.el.ValueExpression;
-import javax.faces.FacesException;
-import javax.faces.component.ActionSource;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-
-import org.apache.myfaces.trinidadinternal.taglib.listener.FileDownloadActionListener;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.FaceletException;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.TagConfig;
-import com.sun.facelets.tag.TagHandler;
-import com.sun.facelets.tag.jsf.ComponentSupport;
-
-/**
- *
- */
-public class FileDownloadActionListenerTag extends TagHandler
-{
-
-  public FileDownloadActionListenerTag(TagConfig tagConfig)
-  {
-    super(tagConfig);
-    _filename = getAttribute("filename");
-    _contentType = getAttribute("contentType");
-    _method = getRequiredAttribute("method");
-  }
-
-  public void apply(FaceletContext faceletContext,
-          UIComponent parent) throws IOException, FacesException, FaceletException, ELException
-  {
-    if(ComponentSupport.isNew(parent))
-    {
-      FileDownloadActionListener listener = new FileDownloadActionListener();
-      if (_filename != null)
-      {
-        if (_filename.isLiteral())
-          listener.setFilename(_filename.getValue());
-        else
-        {
-          ValueExpression valueExp = _filename.getValueExpression(faceletContext,
-                                                                  Object.class);
-          listener.setValueExpression(FileDownloadActionListener.FILENAME_KEY,
-                                     valueExp);
-        }
-      }
-
-      if (_contentType != null)
-      {
-        if (_contentType.isLiteral())
-          listener.setContentType(_contentType.getValue());
-        else
-        {
-          ValueExpression valueExp = _contentType.getValueExpression(faceletContext,
-                                                                  Object.class);
-          listener.setValueExpression(FileDownloadActionListener.CONTENT_TYPE_KEY,
-                                      valueExp);
-        }
-      }
-      
-      MethodExpression me = _method.getMethodExpression(faceletContext,
-                                                        Object.class,
-                                                        _METHOD_PARAMS);
-      listener.setMethod(me);
-
-      ActionSource actionSource = (ActionSource)parent;
-      actionSource.addActionListener(listener);
-    }
-  }
-
-  static private final Class[] _METHOD_PARAMS =
-    new Class[]{FacesContext.class, OutputStream.class};
-
-  private final TagAttribute _method;
-  private final TagAttribute _filename;
-  private final TagAttribute _contentType;
-}

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/LocalePropertyTagRule.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/LocalePropertyTagRule.java?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/LocalePropertyTagRule.java (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/LocalePropertyTagRule.java Mon Nov 30 19:51:30 2009
@@ -1,94 +0,0 @@
-/*
- *  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.trinidadinternal.facelets;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.tag.MetaRule;
-import com.sun.facelets.tag.Metadata;
-import com.sun.facelets.tag.MetadataTarget;
-import com.sun.facelets.tag.TagAttribute;
-
-import com.sun.facelets.tag.TagAttributeException;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import java.util.Locale;
-
-
-class LocalePropertyTagRule extends MetaRule
-{
-  static LocalePropertyTagRule Instance = new LocalePropertyTagRule();
-  
-  private static class LiteralPropertyMetadata extends Metadata
-  {
-    public LiteralPropertyMetadata(Method method, TagAttribute attribute)
-    {
-      _method = method;
-      _attribute = attribute;
-    }
-    
-    public void applyMetadata(FaceletContext ctx, Object instance)
-    {
-      if (_params == null)
-      {
-        Locale loc = new Locale(_attribute.getValue(ctx));        
-        _params = new Object[]{loc};
-      }
-      try
-      {
-        _method.invoke(instance, _params);
-      }
-      catch (InvocationTargetException e)
-      {
-        throw new TagAttributeException(_attribute, e.getCause());
-      }
-      catch (Exception e)
-      {
-        throw new TagAttributeException(_attribute, e);
-      }
-    }
-    
-    private final Method       _method;
-    private final TagAttribute _attribute;
-    private       Object[]     _params;
-  }
-  
-  public Metadata applyRule(String name, TagAttribute attribute,
-                            MetadataTarget meta)
-  {
-    if (meta.getPropertyType(name) == _LOCALE_TYPE && attribute.isLiteral())
-    {
-      Method m = meta.getWriteMethod(name);
-      
-      // if the property is writable
-      if (m != null)
-      {
-        return new LiteralPropertyMetadata(m, attribute);
-      }
-    }
-    
-    return null;
-  }
-  
-
-  
-  static private final Class<? extends Locale> _LOCALE_TYPE = Locale.class;  
-  
-}

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/ResetActionListenerTag.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/ResetActionListenerTag.java?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/ResetActionListenerTag.java (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/ResetActionListenerTag.java Mon Nov 30 19:51:30 2009
@@ -1,57 +0,0 @@
-/*
- *  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.trinidadinternal.facelets;
-
-import java.io.IOException;
-
-import javax.el.ELException;
-import javax.faces.FacesException;
-import javax.faces.component.ActionSource;
-import javax.faces.component.UIComponent;
-
-import org.apache.myfaces.trinidadinternal.taglib.listener.ResetActionListener;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.FaceletException;
-import com.sun.facelets.tag.TagConfig;
-import com.sun.facelets.tag.TagHandler;
-import com.sun.facelets.tag.jsf.ComponentSupport;
-
-/**
- *
- */
-public class ResetActionListenerTag extends TagHandler
-{
-
-  public ResetActionListenerTag(TagConfig tagConfig)
-  {
-    super(tagConfig);
-  }
-
-  public void apply(FaceletContext faceletContext,
-		  UIComponent parent) throws IOException, FacesException, FaceletException, ELException
-  {
-    if(ComponentSupport.isNew(parent))
-    {
-      ActionSource actionSource = (ActionSource)parent;
-      ResetActionListener listener = new ResetActionListener();
-      actionSource.addActionListener(listener);
-    }
-  }
-}
\ No newline at end of file

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/ReturnActionListenerTag.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/ReturnActionListenerTag.java?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/ReturnActionListenerTag.java (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/ReturnActionListenerTag.java Mon Nov 30 19:51:30 2009
@@ -1,70 +0,0 @@
-/*
- *  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.trinidadinternal.facelets;
-
-import java.io.IOException;
-
-import javax.el.ELException;
-import javax.el.ValueExpression;
-import javax.faces.FacesException;
-import javax.faces.component.ActionSource;
-import javax.faces.component.UIComponent;
-
-import org.apache.myfaces.trinidadinternal.taglib.listener.ReturnActionListener;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.FaceletException;
-import com.sun.facelets.el.LegacyValueBinding;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.TagConfig;
-import com.sun.facelets.tag.TagHandler;
-import com.sun.facelets.tag.jsf.ComponentSupport;
-
-/**
- *
- */
-public class ReturnActionListenerTag extends TagHandler
-{
-
-  public ReturnActionListenerTag(TagConfig tagConfig)
-  {
-    super(tagConfig);
-    _value = getAttribute("value");
-  }
-
-  @SuppressWarnings("deprecation")
-  public void apply(FaceletContext faceletContext,
-          UIComponent parent) throws IOException, FacesException, FaceletException, ELException
-  {
-    if(ComponentSupport.isNew(parent))
-    {
-      ActionSource actionSource = (ActionSource)parent;
-      ReturnActionListener listener = new ReturnActionListener();
-      if (_value != null)
-      {
-        ValueExpression valueExp = _value.getValueExpression(faceletContext, Object.class);
-        listener.setValueExpression(ReturnActionListener.VALUE_KEY,valueExp);
-      }
-
-      actionSource.addActionListener(listener);
-    }
-  }
-
-  private final TagAttribute _value;
-}

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/SetActionListenerTag.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/SetActionListenerTag.java?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/SetActionListenerTag.java (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/SetActionListenerTag.java Mon Nov 30 19:51:30 2009
@@ -1,68 +0,0 @@
-/*
- *  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.trinidadinternal.facelets;
-
-import javax.el.ELException;
-import javax.el.ValueExpression;
-import javax.faces.component.ActionSource;
-import javax.faces.component.UIComponent;
-
-import org.apache.myfaces.trinidad.event.SetActionListener;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.FaceletException;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.TagConfig;
-import com.sun.facelets.tag.TagHandler;
-import com.sun.facelets.tag.jsf.ComponentSupport;
-
-/**
- */
-public class SetActionListenerTag extends TagHandler
-{
-	
-  public SetActionListenerTag(TagConfig tagConfig)
-  {
-    super(tagConfig);
-    _from = getRequiredAttribute("from");
-    _to   = getRequiredAttribute("to");
-  }
-  
-  public void apply(FaceletContext faceletContext,
-                    UIComponent parent) throws FaceletException, ELException
-  {
-    if (ComponentSupport.isNew(parent))
-    {
-      // =-=AEW Couldn't this be cached?
-      ValueExpression fromExpression = _from.getValueExpression(faceletContext,
-                                                                Object.class);
-      ValueExpression toExpression=  _to.getValueExpression(faceletContext,
-                                                            Object.class);
-      ActionSource actionSource= (ActionSource) parent;
-      SetActionListener listener = new SetActionListener();
-      listener.setValueExpression("from", fromExpression);
-      listener.setValueExpression("to", toExpression);
-      actionSource.addActionListener(listener);
-    }
-  }
-
-  private final TagAttribute _from;
-  private final TagAttribute _to;
-}
-

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/StringArrayPropertyTagRule.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/StringArrayPropertyTagRule.java?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/StringArrayPropertyTagRule.java (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/StringArrayPropertyTagRule.java Mon Nov 30 19:51:30 2009
@@ -1,116 +0,0 @@
-/*
- *  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.trinidadinternal.facelets;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import java.util.ArrayList;
-import java.util.StringTokenizer;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.tag.Metadata;
-import com.sun.facelets.tag.MetadataTarget;
-import com.sun.facelets.tag.MetaRule;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.TagAttributeException;
-
-/**
- * 
- * @version $Id: StringArrayPropertyTagRule.java,v 1.1 2005/08/23 05:54:54 adamwiner Exp $
- */
-final class StringArrayPropertyTagRule extends MetaRule
-{
-  public static final MetaRule Instance = new StringArrayPropertyTagRule();
-
-  private static class LiteralPropertyMetadata extends Metadata
-  {
-    public LiteralPropertyMetadata(Method method, TagAttribute attribute)
-    {
-      _method = method;
-      _attribute = attribute;
-    }
-    
-    @Override
-    public void applyMetadata(FaceletContext ctx, Object instance)
-    {
-      if (_params == null)
-      {
-        String[] strArray = _coerceToStringArray(_attribute.getValue());
-        _params = new Object[]{strArray};
-      }
-      
-      try
-      {
-        _method.invoke(instance, _params);
-      }
-      catch (InvocationTargetException e)
-      {
-        throw new TagAttributeException(_attribute, e.getCause());
-      }
-      catch (Exception e)
-      {
-        throw new TagAttributeException(_attribute, e);
-      }
-    }
-
-    private final Method       _method;
-    private final TagAttribute _attribute;
-    private       Object[]     _params;
-  }
-   
-
-  @Override
-  public Metadata applyRule(
-     String name,
-     TagAttribute attribute,
-     MetadataTarget meta)
-  {
-    // Leave expressions to the underlying code
-    if ((meta.getPropertyType(name) == _STRING_ARRAY_TYPE) &&
-        attribute.isLiteral())
-    {
-      Method m = meta.getWriteMethod(name);
-      
-      // if the property is writable
-      if (m != null)
-      {
-        return new LiteralPropertyMetadata(m, attribute);
-      }
-    }
-    return null;
-  }
-
-  static private String[] _coerceToStringArray(String str)
-  {
-    if (str == null)
-      return null;
-
-    ArrayList<String> list = new ArrayList<String>();
-    StringTokenizer tokens = new StringTokenizer(str);
-    while (tokens.hasMoreTokens())
-    {
-      list.add(tokens.nextToken());
-    }
-    
-    return list.toArray(new String[list.size()]);
-  }
-
-  static private final Class<? extends String[]> _STRING_ARRAY_TYPE = (new String[0]).getClass();
-}

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/TrinidadComponentHandler.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/TrinidadComponentHandler.java?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/TrinidadComponentHandler.java (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/TrinidadComponentHandler.java Mon Nov 30 19:51:30 2009
@@ -1,94 +0,0 @@
-/*
- *  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.trinidadinternal.facelets;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.FaceletViewHandler;
-import com.sun.facelets.tag.jsf.ComponentHandler;
-import com.sun.facelets.tag.jsf.ComponentConfig;
-
-import com.sun.facelets.tag.MetaRuleset;
-
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-
-import org.apache.myfaces.trinidad.component.UIXComponent;
-
-/**
- * TagLibrary implementation for Apache Trinidad core library.
- * @version
- */
-public class TrinidadComponentHandler extends ComponentHandler
-{
-  public TrinidadComponentHandler(ComponentConfig config) 
-  {
-    super(config);
-    if (_markInitialState == null)
-    {
-      // Can't imagine why this wouldn't always run during
-      // a Faces request...
-      FacesContext context = FacesContext.getCurrentInstance();
-      if (context != null)
-      {
-        ExternalContext external = context.getExternalContext();
-        String restoreMode = external.getInitParameter(
-               FaceletViewHandler.PARAM_BUILD_BEFORE_RESTORE);
-        if ("true".equals(restoreMode))
-          _markInitialState = Boolean.TRUE;
-        else 
-          _markInitialState = Boolean.FALSE;
-      }
-    }
-  }
-
-  @SuppressWarnings("unchecked")
-  @Override
-  protected MetaRuleset createMetaRuleset(Class type)
-  {
-    MetaRuleset m = super.createMetaRuleset(type);
-    
-    m.addRule(StringArrayPropertyTagRule.Instance);
-    m.addRule(TrinidadListenersTagRule.Instance);
-    m.addRule(AccessKeyPropertyTagRule.Instance);
-    m.addRule(DatePropertyTagRule.Instance);
-           
-    return m;
-  }
-
-  @Override
-  protected void onComponentPopulated(FaceletContext context,
-                                     UIComponent component,
-                                     UIComponent parent)
-  {
-    assert (_markInitialState != null);
-
-    if ((component instanceof UIXComponent) &&
-        (_markInitialState == Boolean.TRUE))
-    {
-      if (component.getId() == null)
-        component.setId(context.generateUniqueId(UIViewRoot.UNIQUE_ID_PREFIX));
-
-      ((UIXComponent) component).markInitialState();
-    }
-  }
-
-  static private Boolean _markInitialState;
-}

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/TrinidadConverterHandler.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/TrinidadConverterHandler.java?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/TrinidadConverterHandler.java (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/TrinidadConverterHandler.java Mon Nov 30 19:51:30 2009
@@ -1,42 +0,0 @@
-/*
- *  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.trinidadinternal.facelets;
-
-import com.sun.facelets.tag.MetaRuleset;
-import com.sun.facelets.tag.jsf.ConvertHandler;
-import com.sun.facelets.tag.jsf.ConverterConfig;
-
-public class TrinidadConverterHandler
-  extends ConvertHandler
-{
-  public TrinidadConverterHandler(ConverterConfig config)
-  {
-    super(config);
-  }
-  
-  @Override
-  protected MetaRuleset createMetaRuleset(Class type)
-  {
-    MetaRuleset m = super.createMetaRuleset(type);
-    m.addRule(StringArrayPropertyTagRule.Instance);
-    m.addRule(ValueExpressionTagRule.Instance);
-    m.addRule(LocalePropertyTagRule.Instance);
-    return m;
-  }
-}

Modified: myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/TrinidadFaceletViewHandler.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/TrinidadFaceletViewHandler.java?rev=885567&r1=885566&r2=885567&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/TrinidadFaceletViewHandler.java (original)
+++ myfaces/trinidad/branches/1.2.12.1-sanity-jsf2/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/TrinidadFaceletViewHandler.java Mon Nov 30 19:51:30 2009
@@ -1,262 +0,0 @@
-/*
- *  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.trinidadinternal.facelets;
-
-
-import com.sun.facelets.FaceletViewHandler;
-
-import java.io.IOException;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.faces.FacesException;
-import javax.faces.application.ViewHandler;
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-
-import org.apache.myfaces.trinidad.change.ChangeManager;
-import org.apache.myfaces.trinidad.context.PageResolver;
-import org.apache.myfaces.trinidad.context.RequestContext;
-
-/**
- * ViewHandler implementation for Trinidad in Facelets mode
- */
-public class TrinidadFaceletViewHandler
-  extends FaceletViewHandler
-{
-  
-  // A context parameter for controlling which views should be handled by Facelets 
-  // based on the supplied extensions and prefixes.
-  // We process this parameter exactly like Facelets does with "facelets.VIEW_MAPPINGS" 
-  // with the exception that we get a physical view Id from the PageResolver before checking
-  // its extension/prefix.
-  //
-  // Unfortunately, Facelets provides no hook for plugging the PageResolver into the logic
-  // handling "facelets.VIEW_MAPPINGS". We will recommend that our users leave "facelets.VIEW_MAPPINGS" 
-  // unset and use "org.apache.myfaces.trinidad.FACELETS_VIEW_MAPPINGS" instead.
-  static public final String FACELETS_VIEW_MAPPINGS =
-                            "org.apache.myfaces.trinidad.FACELETS_VIEW_MAPPINGS";
-  
-  public TrinidadFaceletViewHandler(ViewHandler parent)
-  {
-    super(parent);
-    _parent = parent;
-  }
-  
-  /**
-   * Overridden to apply changes from the ChangeManager
-   */
-  @Override
-  protected void buildView(FacesContext context, UIViewRoot viewToRender)
-    throws IOException, FacesException 
-  {
-    super.buildView(context, viewToRender);
-    
-    // Apply changes once we have a stable view tree built. This is the earliest 
-    // opportunity, the document was just attached to the view root.
-    ChangeManager cm = RequestContext.getCurrentInstance().getChangeManager();
-    cm.applyComponentChangesForCurrentView(FacesContext.getCurrentInstance());
-  }
-  
-  
-  /**
-   * Overridden to check wthether the physical viewId (as determined by PageResolver)
-   * should be handled by Facelets
-   */
-  @Override
-  public UIViewRoot restoreView(FacesContext context, String viewId)
-  {
-    _initMappings(context);
-    
-    if (_handledByFacelets(viewId))
-    {
-      return super.restoreView(context, viewId);
-    }
-    else
-    {
-      return _parent.restoreView(context, viewId);
-    }
-  }
-  
-  /**
-   * Overridden to check wthether the physical viewId (as determined by PageResolver)
-   * should be handled by Facelets
-   */
-   @Override
-  public void renderView(FacesContext context, UIViewRoot viewToRender)
-    throws IOException
-  {
-    if (!viewToRender.isRendered()) 
-    {
-      return;
-    }
-    
-    _initMappings(context);
-    
-    if (_handledByFacelets(viewToRender.getViewId())) 
-    {
-      super.renderView(context, viewToRender);
-    }
-    else
-    {
-      _parent.renderView(context, viewToRender);
-    }
-  }
-  
-  /**
-   * Overridden to check wthether the physical viewId (as determined by PageResolver)
-   * should be handled by Facelets
-   */
-  @Override
-  public void writeState(FacesContext context) 
-    throws IOException
-  {
-    _initMappings(context);
-    
-    if (_handledByFacelets(context.getViewRoot().getViewId()))
-    {
-      super.writeState(context);
-    }
-    else
-    {
-      _parent.writeState(context);
-    }
-  }
-  
-  /**
-   * This method uses double-check locking (DLC) to avoid synchronization
-   * when accessing _extensionMappings and _prefixMappings
-   * Note that _mappingsInitialized, _extensionMappings and _prefixMappings
-   * are declared 'volatile', and _extensionMappings/_prefixMappings are not modified
-   * since they are constructed. 
-   * JDK5 and later extends the semantics for volatile so 
-   * that the system will not allow a write of a volatile to be reordered with respect 
-   * to any previous read or write, and a read of a volatile cannot be reordered with 
-   * respect to any following read or write
-   */
-  private void _initMappings(FacesContext context)
-  {
-    if (_mappingsInitialized)
-    {
-      return;
-    }
-    synchronized(this)
-    {
-      if (!_mappingsInitialized)
-      {
-        ExternalContext external = context.getExternalContext();
-        String viewMappings = external.getInitParameter(FACELETS_VIEW_MAPPINGS);
-        if ((viewMappings != null) && (viewMappings.length() > 0)) 
-        {
-          String[] mappingsArray = viewMappings.split(";");
-          
-          Set<String> extensionMappings = new HashSet<String>(mappingsArray.length);
-          Set<String> prefixMappings = new HashSet<String>(mappingsArray.length);
-          
-          for (int i = 0; i < mappingsArray.length; i++) 
-          {
-            String mapping = mappingsArray[i].trim();
-            int mappingLength = mapping.length();
-            if (mappingLength <= 1) 
-            {
-              continue;
-            }
-      
-            if (mapping.charAt(0) == '*') 
-            {
-              extensionMappings.add(mapping.substring(1));
-            } 
-            else if (mapping.charAt(mappingLength - 1) == '*') 
-            {
-              prefixMappings.add(mapping.substring(0, mappingLength - 1));
-            }
-          }
-          
-          if (extensionMappings.size() > 0)
-          {
-            _extensionMappings = new HashSet<String>(extensionMappings);
-          }
-          
-          if (prefixMappings.size() > 0)
-          {
-            _prefixMappings = new HashSet<String>(prefixMappings);
-          }
-        }
-       
-        _mappingsInitialized = true;
-      }
-    }
-  }
-  
-  private boolean _handledByFacelets(String viewId) 
-  {
-    // If there's no extension or prefixe mappings, then
-    // just make Facelets handle everything
-    if ((_extensionMappings == null) && (_prefixMappings == null)) 
-    {
-      return true;
-    }
-    
-    // Since extension/prefix mappings apply to physical URIs, we need
-    // to get a physical viewId. It is assumed that getPhysicalURI() lookup is
-    // relatively cheap
-    RequestContext afc = RequestContext.getCurrentInstance();
-    if (afc != null)
-    {
-      viewId = afc.getPageResolver().getPhysicalURI(viewId);
-    }
-    
-    if (_extensionMappings != null) 
-    {
-      for (String extension: _extensionMappings) 
-      {
-        if (viewId.endsWith(extension)) 
-        {
-          return true;
-        }
-      }
-    }
-    
-    if (_prefixMappings != null) 
-    {
-      for (String prefix: _prefixMappings) 
-      {
-        if (viewId.startsWith(prefix)) 
-        {
-            return true;
-        }
-      }
-    }
-    
-    return false;
-  }
-  
-  
-  private final ViewHandler _parent;
-  
-  // Set of viewId extensions that should be handled by Facelets
-  private volatile Set<String> _extensionMappings;
-
-  // Set of viewId prefixes that should be handled by Facelets
-  private volatile Set<String> _prefixMappings;
-  
-  private volatile boolean _mappingsInitialized = false;
-}