incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r452744 - in /incubator/adffaces/branches/faces-1_2/trinidad: ./ trinidad-api/ trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/ trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/ trinidad-api/src/main/ja...
Date Wed, 04 Oct 2006 05:49:57 GMT
Author: awiner
Date: Tue Oct  3 22:49:55 2006
New Revision: 452744

URL: http://svn.apache.org/viewvc?view=rev&rev=452744
Log:
First batch of JSF 1.2 changes:
- implement ValueExpression storage on FacesBean and FacesBeanImpl
- implement get/setValueExpression() on UIXComponentBase
- switch collection over to getContainerClientId() API
- implement invokeOnComponent() for collection components
- switch to proper generic APIs on UIXComponent
- Move to ViewHandlerWrapper for ViewHandlerImpl parent class

Some significant remaining issues:
- API tests fail, because Shale does not implement getELContext() on FacesContext (or otherwise have JSF 1.2 support)
- Need to change JSP generation over to JSP 2.1/JSF 1.2 base classes
- Need to change MethodBindings to MethodExpressions whereever possible
- Need to implement ActionSource2 on command components
- Eliminate LegacyELValueBinding, etc., code from Facelets layer
- Need full implementation of invokeOnComponent() across all base classes

Added:
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/ValueBindingValueExpression.java
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/ValueExpressionValueBinding.java
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/ValueExpressionBoundValue.java
      - copied, changed from r452637, incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/ValueBindingBoundValue.java
Removed:
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/ValueBindingBoundValue.java
Modified:
    incubator/adffaces/branches/faces-1_2/trinidad/pom.xml
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/pom.xml
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXDecorateCollectionTemplate.java
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBean.java
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBeanImpl.java
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponent.java
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ProcessMenuModel.java
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ProcessUtils.java
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/MessageFactory.java
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-build/pom.xml
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-demo/pom.xml
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/pom.xml
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewHandlerImpl.java
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/DialogServiceImpl.java
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/DateTimeConverter.java
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/ResponseWriterDecorator.java
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/htmlBasic/ComponentFacesBean.java
    incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/UINodeFacesBean.java

Modified: incubator/adffaces/branches/faces-1_2/trinidad/pom.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/pom.xml?view=diff&rev=452744&r1=452743&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/pom.xml (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/pom.xml Tue Oct  3 22:49:55 2006
@@ -22,7 +22,7 @@
   <artifactId>trinidad</artifactId>
   <packaging>pom</packaging>
   <name>Apache Incubator Trinidad Podling</name>
-  <version>incubator-m1-SNAPSHOT</version>
+  <version>incubator-1.2-m1-SNAPSHOT</version>
   <description>Apache Incubator Trinidad Podling</description>
 
   <issueManagement>
@@ -247,8 +247,10 @@
           <configuration>
             <source>1.5</source>
             <target>1.5</target>
+<!--
             <showWarnings>true</showWarnings>
-            <compilerArgument>-Xlint:all,-serial,-fallthrough</compilerArgument>
+            <compilerArgument>-Xlint:all,-serial,-fallthrough,-deprecation</compilerArgument>
+-->
           </configuration>
         </plugin>
 
@@ -338,16 +340,16 @@
       </dependency>
 
       <dependency>
-        <groupId>org.apache.myfaces.core</groupId>
-        <artifactId>myfaces-api</artifactId>
-        <version>1.1.2</version>
+        <groupId>javax.faces</groupId>
+        <artifactId>jsf-api</artifactId>
+        <version>1.2-b19</version>
         <scope>provided</scope>
       </dependency>
 
       <dependency>
-        <groupId>org.apache.myfaces.core</groupId>
-        <artifactId>myfaces-impl</artifactId>
-        <version>1.1.2</version>
+        <groupId>javax.faces</groupId>
+        <artifactId>jsf-impl</artifactId>
+        <version>1.2-b19</version>
         <scope>provided</scope>
       </dependency>
 
@@ -375,20 +377,20 @@
       <dependency>
         <groupId>org.apache.myfaces.trinidad</groupId>
         <artifactId>trinidad-build</artifactId>
-        <version>incubator-m1-SNAPSHOT</version>
+        <version>${pom.version}</version>
         <scope>provided</scope>
       </dependency>
 
       <dependency>
         <groupId>org.apache.myfaces.trinidad</groupId>
         <artifactId>trinidad-api</artifactId>
-        <version>incubator-m1-SNAPSHOT</version>
+        <version>${pom.version}</version>
       </dependency>
 
       <dependency>
         <groupId>org.apache.myfaces.trinidad</groupId>
         <artifactId>trinidad-api</artifactId>
-        <version>incubator-m1-SNAPSHOT</version>
+        <version>${pom.version}</version>
         <type>test-jar</type>
         <scope>test</scope>
       </dependency>
@@ -396,7 +398,7 @@
       <dependency>
         <groupId>org.apache.myfaces.trinidad</groupId>
         <artifactId>trinidad-impl</artifactId>
-        <version>incubator-m1-SNAPSHOT</version>
+        <version>${pom.version}</version>
       </dependency>
 
 
@@ -412,7 +414,7 @@
       <dependency>
         <groupId>com.sun.facelets</groupId>
         <artifactId>jsf-facelets</artifactId>
-        <version>1.1.6</version>
+        <version>1.1.11</version>
       </dependency>
 
 <!--

Modified: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/pom.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/pom.xml?view=diff&rev=452744&r1=452743&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/pom.xml (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/pom.xml Tue Oct  3 22:49:55 2006
@@ -18,7 +18,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad</artifactId>
-    <version>incubator-m1-SNAPSHOT</version>
+    <version>incubator-1.2-m1-SNAPSHOT</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
@@ -132,8 +132,8 @@
     </dependency>
 
     <dependency>
-      <groupId>org.apache.myfaces.core</groupId>
-      <artifactId>myfaces-api</artifactId>
+      <groupId>javax.faces</groupId>
+      <artifactId>jsf-api</artifactId>
     </dependency>
 
     <!-- "test" scope dependencies -->

Modified: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXDecorateCollectionTemplate.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXDecorateCollectionTemplate.java?view=diff&rev=452744&r1=452743&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXDecorateCollectionTemplate.java (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXDecorateCollectionTemplate.java Tue Oct  3 22:49:55 2006
@@ -15,6 +15,7 @@
  */
 package org.apache.myfaces.trinidad.component;
 
+import javax.faces.context.FacesContext;
 import javax.faces.component.NamingContainer;
 
 /**
@@ -61,9 +62,9 @@
    * @return the local clientId
    */
   @Override
-  protected final String getLocalClientId()
+  public final String getContainerClientId(FacesContext context)
   {
-    String id = super.getLocalClientId();
+    String id = getClientId(context);
     String key = getCurrencyString();
     if (key != null)
     {

Modified: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBean.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBean.java?view=diff&rev=452744&r1=452743&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBean.java (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBean.java Tue Oct  3 22:49:55 2006
@@ -21,6 +21,8 @@
 import java.util.Map;
 import java.util.Set;
 
+import javax.el.ValueExpression;
+
 import javax.faces.context.FacesContext;
 import javax.faces.el.ValueBinding;
 
@@ -59,19 +61,27 @@
    * @exception IllegalArgumentException if key is a list key
    */
   public Object getLocalProperty(PropertyKey key);
-  
+
+  /**
+   * Return the value expression for a key.
+   * @exception IllegalArgumentException if the property does
+   *   not support value bindings.
+   */
+  public ValueExpression getValueExpression(PropertyKey key);
+
   /**
    * Return the value binding for a key.
    * @exception IllegalArgumentException if the property does
    *   not support value bindings.
+   * @deprecated
    */
   public ValueBinding getValueBinding(PropertyKey key);
 
   /**
    * Gets the current unevaluated value for the specified property key. 
    * <p>The method will first look for a local value. If it exists, it will 
-   * be returned. If it does not and the bean supports value bindings, the 
-   * method will look for a binding with the specified key and return it 
+   * be returned. If it does not and the bean supports value expressions, the 
+   * method will look for an expression with the specified key and return it 
    * directly if it exists without evaluatig its value.</p>
    * <p>This method is mainly used when:</p>
    * <ul>
@@ -94,21 +104,30 @@
    * @param key the parameter key of the raw property value to get.
    * 
    * @return the local value of the specified key if it exists, a 
-   *         <code>ValueBinding</code> object if the specified key 
-   *         supports bindings and a binding was specified for that 
+   *         <code>ValueExpression</code> object if the specified key 
+   *         supports expressions and an expression was specified for that 
    *         property, <code>null</code> otherwise.
    * 
    * @throws IllegalArgumentException if the specified key is a list key.
    * 
    * @see #getLocalProperty(PropertyKey)
    * @see #getValueBinding(PropertyKey)
+   * @see #getValueExpression(PropertyKey)
    */
   public Object getRawProperty(PropertyKey key);
 
   /**
+   * Set the value expression for a key.
+   * @exception IllegalArgumentException if the property does
+   *   not support value expressions.
+   */
+  public void setValueExpression(PropertyKey key, ValueExpression expression);
+
+  /**
    * Set the value binding for a key.
    * @exception IllegalArgumentException if the property does
    *   not support value bindings.
+   * @deprecated
    */
   public void setValueBinding(PropertyKey key, ValueBinding binding);
 

Modified: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBeanImpl.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBeanImpl.java?view=diff&rev=452744&r1=452743&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBeanImpl.java (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBeanImpl.java Tue Oct  3 22:49:55 2006
@@ -23,6 +23,8 @@
 import java.util.List;
 import java.util.Set;
 
+import javax.el.ValueExpression;
+
 import javax.faces.context.FacesContext;
 import javax.faces.el.ValueBinding;
 
@@ -58,11 +60,11 @@
     // Look for a binding if and only if the key supports bindings
     if (key.getSupportsBinding())
     {
-      ValueBinding binding = getValueBinding(key);
-      if (binding != null)
+      ValueExpression expression = getValueExpression(key);
+      if (expression != null)
       {
         FacesContext context = FacesContext.getCurrentInstance();
-        return binding.getValue(context);
+        return expression.getValue(context.getELContext());
       }
     }
 
@@ -83,7 +85,7 @@
       return local;
 
     // Look for a binding if and only if the key supports bindings
-    return key.getSupportsBinding() ? getValueBinding(key) : null;
+    return key.getSupportsBinding() ? getValueExpression(key) : null;
   }
 
 
@@ -106,18 +108,19 @@
     return getLocalPropertyImpl(key);
   }
 
-  final public ValueBinding getValueBinding(PropertyKey key)
+  final public ValueExpression getValueExpression(PropertyKey key)
   {
     _checkNotListKey(key);
 
-    PropertyMap map = _getBindingsMap(false);
+    PropertyMap map = _getExpressionsMap(false);
     if (map == null)
       return null;
 
-    return (ValueBinding) map.get(key);
+    return (ValueExpression) map.get(key);    
   }
 
-  final public void setValueBinding(PropertyKey key, ValueBinding binding)
+  final public void setValueExpression(PropertyKey key,
+                                       ValueExpression expression)
   {
     _checkNotListKey(key);
 
@@ -127,18 +130,46 @@
          "Property \"" + key.getName() + "\" cannot be bound.");
     }
 
-    if (binding == null)
+    if (expression == null)
     {
-      PropertyMap map = _getBindingsMap(false);
+      PropertyMap map = _getExpressionsMap(false);
       if (map != null)
         map.remove(key);
     }
     else
     {
-      _getBindingsMap(true).put(key, binding);
+      _getExpressionsMap(true).put(key, expression);
     }
 
   }
+  
+  final public ValueBinding getValueBinding(PropertyKey key)
+  {
+    ValueExpression ve = getValueExpression(key);
+    if (ve == null)
+      return null;
+      
+    if (ve instanceof ValueBindingValueExpression)
+      return ((ValueBindingValueExpression) ve).getValueBinding();
+      
+    return new ValueExpressionValueBinding(ve);
+  }
+
+  final public void setValueBinding(PropertyKey key, ValueBinding binding)
+  {
+    ValueExpression ve;
+    
+    if (binding == null)
+    {
+      ve = null;
+    }
+    else
+    {
+      ve = new ValueBindingValueExpression(binding);
+    }
+
+    setValueExpression(key, ve);
+  }
 
 
   @SuppressWarnings("unchecked")
@@ -281,10 +312,10 @@
   @SuppressWarnings("unchecked")
   final public Set<PropertyKey> bindingKeySet()
   {
-    if (_bindings == null)
+    if (_expressions == null)
       return Collections.emptySet();
 
-    return _bindings.keySet();
+    return _expressions.keySet();
   }
 
 
@@ -295,8 +326,8 @@
     if (_properties != null)
       _properties.markInitialState();
 
-    if (_bindings != null)
-      _bindings.markInitialState();
+    if (_expressions != null)
+      _expressions.markInitialState();
   }
 
   public void restoreState(FacesContext context, Object state)
@@ -314,7 +345,7 @@
         Object propertyState = asArray[0];
         Object bindingsState = asArray[1];
         _getPropertyMap().restoreState(context, getType(), propertyState);
-        _getBindingsMap(true).restoreState(context, getType(), bindingsState);
+        _getExpressionsMap(true).restoreState(context, getType(), bindingsState);
         return;
       }
       else if (asArray.length == 1)
@@ -339,9 +370,9 @@
     Object propertyState = (_properties == null)
                             ? null
                             : _properties.saveState(context);
-    Object bindingsState = (_bindings == null)
+    Object bindingsState = (_expressions == null)
                             ? null
-                            : _bindings.saveState(context);
+                            : _expressions.saveState(context);
 
     if (bindingsState != null)
     {
@@ -390,11 +421,9 @@
     return new FlaggedPropertyMap();
   }
 
-  protected PropertyMap createBindingsMap()
+  protected PropertyMap createExpressionsMap()
   {
-    FlaggedPropertyMap bindings = new FlaggedPropertyMap();
-    bindings.setUseStateHolder(true);
-    return bindings;
+    return new FlaggedPropertyMap();
   }
 
   // "listKey" is unused, but it seems plausible that
@@ -445,17 +474,17 @@
     return _properties;
   }
 
-  private PropertyMap _getBindingsMap(boolean createIfNew)
+  private PropertyMap _getExpressionsMap(boolean createIfNew)
   {
-    if (_bindings == null)
+    if (_expressions == null)
     {
       if (createIfNew)
       {
-        _bindings = createBindingsMap();
+        _expressions = createExpressionsMap();
       }
     }
 
-    return _bindings;
+    return _expressions;
   }
 
 
@@ -474,7 +503,7 @@
   }
 
   private PropertyMap  _properties;
-  private PropertyMap  _bindings;
+  private PropertyMap  _expressions;
   private transient boolean  _initialStateMarked;
 
   static private final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(FacesBeanImpl.class);

Added: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/ValueBindingValueExpression.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/ValueBindingValueExpression.java?view=auto&rev=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/ValueBindingValueExpression.java (added)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/ValueBindingValueExpression.java Tue Oct  3 22:49:55 2006
@@ -0,0 +1,80 @@
+package org.apache.myfaces.trinidad.bean;
+
+import java.io.Serializable;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+
+@Deprecated
+class ValueBindingValueExpression
+  extends ValueExpression implements Serializable
+{
+
+  // TODO implement serialization correctly?
+  public ValueBindingValueExpression(ValueBinding binding)
+  {
+    _binding = binding;
+  }
+  
+  public ValueBinding getValueBinding()
+  {
+    return _binding;
+  }
+  
+  public Object getValue(ELContext elContext)
+  {
+    return _binding.getValue(FacesContext.getCurrentInstance());
+  }
+
+  public void setValue(ELContext elContext, Object object)
+  {
+    _binding.setValue(FacesContext.getCurrentInstance(), object);
+  }
+
+  public boolean isReadOnly(ELContext elContext)
+  {
+    return _binding.isReadOnly(FacesContext.getCurrentInstance());
+  }
+
+  public Class<?> getType(ELContext elContext)
+  {
+    return _binding.getType(FacesContext.getCurrentInstance());
+  }
+
+  public Class<?> getExpectedType()
+  {
+    return null;
+  }
+
+  public String getExpressionString()
+  {
+    return _binding.getExpressionString();
+  }
+
+  public boolean isLiteralText()
+  {
+    return false;
+  }
+
+  public boolean equals(Object o)
+  {
+    if (o == this)
+      return true;
+    if (!(o instanceof ValueBindingValueExpression))
+      return false;
+      
+    ValueBindingValueExpression that = (ValueBindingValueExpression) o;
+    return that._binding.equals(_binding);
+  }
+
+  public int hashCode()
+  {
+    return _binding.hashCode();
+  }
+
+  private final ValueBinding _binding;
+}

Added: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/ValueExpressionValueBinding.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/ValueExpressionValueBinding.java?view=auto&rev=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/ValueExpressionValueBinding.java (added)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/ValueExpressionValueBinding.java Tue Oct  3 22:49:55 2006
@@ -0,0 +1,43 @@
+package org.apache.myfaces.trinidad.bean;
+
+import javax.el.ValueExpression;
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+@Deprecated
+public class ValueExpressionValueBinding
+  extends ValueBinding
+{
+  public ValueExpressionValueBinding(ValueExpression ve)
+  {
+    _ve = ve;
+  }
+
+  public ValueExpression getValueExpression()
+  {
+    return _ve;
+  }
+  
+  public Object getValue(FacesContext facesContext)
+  {
+    return _ve.getValue(facesContext.getELContext());
+  }
+
+  public void setValue(FacesContext facesContext, Object object)
+  {
+    _ve.setValue(facesContext.getELContext(), object);
+  }
+
+  public boolean isReadOnly(FacesContext facesContext)
+  {
+    return _ve.isReadOnly(facesContext.getELContext());
+  }
+
+  public Class getType(FacesContext facesContext)
+  {
+    return _ve.getType(facesContext.getELContext());
+  }
+  
+  private final ValueExpression _ve;
+}

Modified: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java?view=diff&rev=452744&r1=452743&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java Tue Oct  3 22:49:55 2006
@@ -24,6 +24,8 @@
 import java.util.Map;
 import java.util.Set;
 
+import javax.faces.FacesException;
+import javax.faces.component.ContextCallback;
 import javax.faces.component.NamingContainer;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
@@ -649,9 +651,9 @@
    * @return the local clientId
    */
   @Override
-  protected final String getLocalClientId()
+  public final String getContainerClientId(FacesContext context)
   {
-    String id = super.getLocalClientId();
+    String id = getClientId(context);
     String key = getCurrencyString();
     if (key != null)
     {
@@ -1170,6 +1172,47 @@
       return ((UIXComponent) component).getFacetCount();
 
     return component.getFacets().size();
+  }
+
+  public boolean invokeOnComponent(FacesContext context,
+                                   String clientId, 
+                                   ContextCallback callback)
+    throws FacesException
+  {
+    String thisClientId = getClientId(context);
+    if (clientId.equals(thisClientId))
+    {
+      callback.invokeContextCallback(context, this);
+      return true;
+    }
+    // If we're on a row, set the currency, and invoke
+    // inside
+    else if (clientId.startsWith(thisClientId) &&
+             (clientId.charAt(thisClientId.length()) ==
+              NamingContainer.SEPARATOR_CHAR))
+    {
+      String postId = thisClientId.substring(
+                        thisClientId.length() + 1);
+      int sepIndex = postId.indexOf(NamingContainer.SEPARATOR_CHAR);
+      // If there's no separator character afterwards, then this
+      // isn't a row key
+      if (sepIndex < 0)
+        return super.invokeOnComponent(context, clientId, callback);
+      String currencyString = postId.substring(0, sepIndex);
+      Object oldRowKey = getRowKey();
+      try
+      {
+        setCurrencyString(currencyString);
+        return super.invokeOnComponent(context, clientId, callback);        
+      }
+      finally
+      {
+        // And restore the currency
+        setRowKey(oldRowKey);
+      }
+    }
+    
+    return false;
   }
 
   private static final class InternalState implements Serializable

Modified: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponent.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponent.java?view=diff&rev=452744&r1=452743&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponent.java (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponent.java Tue Oct  3 22:49:55 2006
@@ -46,36 +46,4 @@
   abstract public MethodBinding getAttributeChangeListener();
 
   abstract public void markInitialState();
-
-  // JSF 1.2 methods that we're adding up front
-  abstract public int getFacetCount();
-  abstract public void encodeAll(FacesContext context) throws IOException;
-
-  
-  // Everything below here is a UIComponent method
-
-  @SuppressWarnings("unchecked")
-  @Override
-  public abstract Map getAttributes();
-
-  @SuppressWarnings("unchecked")
-  @Override
-  public abstract List getChildren();
-
-  @SuppressWarnings("unchecked")
-  @Override
-  public abstract Map getFacets();
-
-  @SuppressWarnings("unchecked")
-  @Override
-  public abstract Iterator getFacetsAndChildren();
-
-  @SuppressWarnings("unchecked")
-  @Override
-  protected abstract FacesListener[] getFacesListeners(Class clazz);
-
-  public abstract Object saveState(FacesContext context);
-  public abstract void restoreState(FacesContext context, Object state);
-  public abstract boolean isTransient();
-  public abstract void setTransient(boolean trans);
 }

Modified: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java?view=diff&rev=452744&r1=452743&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java Tue Oct  3 22:49:55 2006
@@ -25,6 +25,11 @@
 import java.util.NoSuchElementException;
 import java.util.Properties;
 
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+
+import javax.faces.FacesException;
+import javax.faces.component.ContextCallback;
 import javax.faces.component.NamingContainer;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
@@ -176,6 +181,45 @@
   }
 
 
+  @Override
+  public ValueExpression getValueExpression(String name)
+  {
+    if (name == null)
+      throw new NullPointerException();
+
+    PropertyKey key = getPropertyKey(name);
+
+    // Support standard RI behavior where getValueBinding()
+    // doesn't complain about being asked for a ValueBinding -
+    // but continue supporting strict behavior at FacesBean layer.
+    if (!key.getSupportsBinding())
+      return null;
+
+    return getFacesBean().getValueExpression(key);
+  }
+
+  @Override
+  public void setValueExpression(String name, 
+                                 ValueExpression expression)
+  {
+    if (name == null)
+      throw new NullPointerException();
+
+    if (expression.isLiteralText())
+    {
+      ELContext context =
+          FacesContext.getCurrentInstance().getELContext();
+      getAttributes().put(name, expression.getValue(context));
+    }
+    else
+    {
+      PropertyKey key = getPropertyKey(name);
+      getFacesBean().setValueExpression(key, expression);
+    }
+  }
+
+
+
   /**
    */
   @Override
@@ -207,9 +251,8 @@
   }
 
 
-  @SuppressWarnings("unchecked")
   @Override
-  public Map getAttributes()
+  public Map<String, Object> getAttributes()
   {
     if (_attributes == null)
       _init(null);
@@ -226,7 +269,7 @@
     // NOTE - client ids cannot be cached because the generated
     // value has to be dynamically calculated in some cases (UIData)
 
-    String clientId = getLocalClientId();
+    String clientId = getId();
     if (clientId == null)
     {
       clientId = (String) getProperty(_GENERATED_ID_KEY);
@@ -243,7 +286,7 @@
     {
       if (containerComponent instanceof NamingContainer)
       {
-        clientId = (containerComponent.getClientId(context) +
+        clientId = (containerComponent.getContainerClientId(context) +
                     NamingContainer.SEPARATOR_CHAR +
                     clientId);
         break;
@@ -317,13 +360,11 @@
     setBooleanProperty(RENDERED_KEY, rendered);
   }
 
-  @Override
   public boolean isTransient()
   {
     return getBooleanProperty(TRANSIENT_KEY, false);
   }
 
-  @Override
   public void setTransient(boolean newTransient)
   {
     setBooleanProperty(TRANSIENT_KEY, newTransient);
@@ -458,9 +499,8 @@
    * <p>Create (if necessary) and return a List of the children associated
    * with this component.</p>
    */
-  @SuppressWarnings("unchecked")
   @Override
-  public List getChildren()
+  public List<UIComponent> getChildren()
   {
     if (_children == null)
       _children = new ChildArrayList(this);
@@ -481,9 +521,8 @@
    * <p>Create (if necessary) and return a Map of the facets associated
    * with this component.</p>
    */
-  @SuppressWarnings("unchecked")
   @Override
-  public Map getFacets()
+  public Map<String, UIComponent> getFacets()
   {
 
     if (_facets == null)
@@ -500,7 +539,7 @@
       throw new NullPointerException();
     if (_facets == null)
       return null;
-    return (UIComponent) getFacets().get(facetName);
+    return getFacets().get(facetName);
   }
 
 
@@ -522,9 +561,8 @@
   /**
    * @todo optimize to a compound iterator
    */
-  @SuppressWarnings("unchecked")
   @Override
-  public Iterator getFacetsAndChildren()
+  public Iterator<UIComponent> getFacetsAndChildren()
   {
     // =-=AEW Is this supposed to be an immutable Iterator?
     if (_facets == null)
@@ -560,7 +598,6 @@
 
   // ------------------------------------------- Event processing methods
 
-  @SuppressWarnings("unchecked")
   @Override
   public void broadcast(FacesEvent event)
     throws AbortProcessingException
@@ -601,7 +638,6 @@
   // ------------------------------------------- Lifecycle Processing Methods
 
 
-  @SuppressWarnings("unchecked")
   @Override
   public void decode(FacesContext context)
   {
@@ -609,9 +645,7 @@
       throw new NullPointerException();
 
     // Find all the partialTriggers and save on the context
-    // -= Simon Lessard =-
-    // FIXME: JSF 1.2 specify <String, Object>
-    Map<Object, Object> attrs = getAttributes();
+    Map<String, Object> attrs = getAttributes();
     Object triggers = attrs.get("partialTriggers");
     if (triggers instanceof String[])
     {
@@ -818,13 +852,11 @@
     getFacesBean().markInitialState();
   }
 
-  @Override
   public Object saveState(FacesContext context)
   {
     return getFacesBean().saveState(context);
   }
 
-  @Override
   public void restoreState(FacesContext context, Object stateObj)
   {
     getFacesBean().restoreState(context, stateObj);
@@ -879,7 +911,6 @@
    * component.
    * @param context the current FacesContext
    */
-  @SuppressWarnings("unchecked")
   protected void decodeChildrenImpl(FacesContext context)
   {
     Iterator<UIComponent> kids = getFacetsAndChildren();
@@ -915,7 +946,6 @@
    * component.
    * @param context the current FacesContext
    */
-  @SuppressWarnings("unchecked")
   protected void validateChildrenImpl(FacesContext context)
   {
     // Process all the facets and children of this component
@@ -947,7 +977,6 @@
     updateChildrenImpl(context);
   }
 
-  @SuppressWarnings("unchecked")
   protected void updateChildrenImpl(FacesContext context)
   {
     // Process all the facets and children of this component
@@ -977,7 +1006,6 @@
     getFacesBean().removeEntry(_LISTENERS_KEY, listener);
   }
 
-  @SuppressWarnings("unchecked")
   @Override
   protected FacesListener[] getFacesListeners(Class clazz)
   {
@@ -1116,15 +1144,6 @@
     return n.intValue();
   }
 
-  /**
-   * Returns the default local client identifier, relative to the current
-   * naming container.
-   */
-  protected String getLocalClientId()
-  {
-    return getId();
-  }
-
 
   /**
    * Return the number of facets.  This is more efficient than
@@ -1172,7 +1191,6 @@
    * render a component. this is called by renderers whose
    * getRendersChildren() return true.
    */
-  @SuppressWarnings("unchecked")
   void __encodeRecursive(FacesContext context, UIComponent component)
     throws IOException
   {
@@ -1187,7 +1205,7 @@
       {
         if (component.getChildCount() > 0)
         {
-          for(UIComponent child : (List<UIComponent>)component.getChildren())
+          for(UIComponent child : component.getChildren())
           {
             __encodeRecursive(context, child);
           }
@@ -1199,7 +1217,6 @@
   }
 
 
-  @SuppressWarnings("unchecked")
   static private UIComponent _findInsideOf(
     UIComponent from,
     String id)

Modified: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ProcessMenuModel.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ProcessMenuModel.java?view=diff&rev=452744&r1=452743&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ProcessMenuModel.java (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ProcessMenuModel.java Tue Oct  3 22:49:55 2006
@@ -106,7 +106,7 @@
   public ProcessMenuModel(
     Object instance,
     String viewIdProperty,
-    Object maxPathKey
+    String maxPathKey
   )throws IntrospectionException
   {
     super(instance, viewIdProperty);
@@ -148,7 +148,7 @@
   */
   public boolean isImmediate()
   {
-    Object maxPathKey = getMaxPathKey();
+    String maxPathKey = getMaxPathKey();
     if ( maxPathKey == null)
       return ProcessUtils.isImmediate(this, false);
     else
@@ -186,7 +186,7 @@
   */
   public boolean isReadOnly()
   {
-    Object maxPathKey = getMaxPathKey();
+    String maxPathKey = getMaxPathKey();
     if (maxPathKey == null)
       return ProcessUtils.isReadOnly(this, true);
     else
@@ -201,20 +201,20 @@
    */
   public void clearMaxPath()
   {
-    Object maxPathKey = getMaxPathKey();
+    String maxPathKey = getMaxPathKey();
     if ( maxPathKey != null)
       ProcessUtils.clearMaxPath(maxPathKey);
   }
 
-  public void setMaxPathKey(Object maxPathKey)
+  public void setMaxPathKey(String maxPathKey)
   {
     _maxPathKey = maxPathKey;
   }
 
-  public Object getMaxPathKey()
+  public String getMaxPathKey()
   {
     return _maxPathKey;
   }
 
-  Object _maxPathKey = null;
+  private String _maxPathKey;
 }

Modified: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ProcessUtils.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ProcessUtils.java?view=diff&rev=452744&r1=452743&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ProcessUtils.java (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ProcessUtils.java Tue Oct  3 22:49:55 2006
@@ -322,13 +322,12 @@
   @SuppressWarnings("unchecked")
   public static Object getMaxVisitedRowKey(
     MenuModel model,
-    Object    maxPathKey
+    String    maxPathKey
   )
   {
     //TODO - what if maxPathKey is null
     ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
-    //FIXME As of JSF 1.2, the request map is <String, Object> 
-    Map<Object, Object> requestMap = externalContext.getRequestMap();
+    Map<String, Object> requestMap = externalContext.getRequestMap();
 
 
 
@@ -339,9 +338,7 @@
 
       //TODO - if I change this to use pageFlowScope it doesn't work.
       // figure out why.
-      // FIXME: -= Simon Lessard
-      //        session map is <String, Object> as of JSF 1.2
-      Map<Object,Object> sessionMap  = externalContext.getSessionMap();
+      Map<String,Object> sessionMap  = externalContext.getSessionMap();
 
       Map<Object,Object> maxPathMap = (Map<Object,Object>)sessionMap.get(maxPathKey);
       if (maxPathMap == null)
@@ -404,13 +401,12 @@
 
   @SuppressWarnings("unchecked")
   public static void clearMaxPath(
-    Object maxPathKey
+    String maxPathKey
   )
   {
     if (maxPathKey != null)
     {
-      // FIXME As of JSF 1.2, the request map is <String, Object> 
-      Map<Object, Object> sessionMap = FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
+      Map<String, Object> sessionMap = FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
       sessionMap.put(maxPathKey, null);
     }
   }

Modified: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/MessageFactory.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/MessageFactory.java?view=diff&rev=452744&r1=452743&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/MessageFactory.java (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/MessageFactory.java Tue Oct  3 22:49:55 2006
@@ -19,7 +19,8 @@
 import javax.faces.application.FacesMessage;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
+
+import javax.el.ValueExpression;
 
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
@@ -412,11 +413,11 @@
     for (int i = 0; i < parameters.length; i++)
     {
       Object o = parameters[i];
-      if (o instanceof ValueBinding)
+      if (o instanceof ValueExpression)
       {
         if (context == null)
           context = FacesContext.getCurrentInstance();
-        o = ((ValueBinding) o).getValue(context);
+        o = ((ValueExpression) o).getValue(context.getELContext());
       }
       
       resolvedParameters[i] = o;
@@ -441,7 +442,7 @@
 
     for (int i = 0; i < parameters.length; i++)
     {
-      if (parameters[i] instanceof ValueBinding)
+      if (parameters[i] instanceof ValueExpression)
         return true;
     }
 
@@ -455,7 +456,7 @@
     Object[] parameters)
   {
     _assertIsValidCustomMessageType(customMessagePattern);
-    boolean isCustomMsgValueBound = (customMessagePattern instanceof ValueBinding);
+    boolean isCustomMsgValueBound = (customMessagePattern instanceof ValueExpression);
     boolean containsBinding = _containsBinding(parameters);
     if (isCustomMsgValueBound || containsBinding)
     {
@@ -466,7 +467,7 @@
       }
       else
       {
-        ValueBinding customMessage = (ValueBinding)customMessagePattern;
+        ValueExpression customMessage = (ValueExpression)customMessagePattern;
         return new CustomDetailErrorMessage(summary, customMessage,
                                             parameters, containsBinding);
       }
@@ -488,14 +489,14 @@
     {
       o = component.getAttributes().get("label");
       if (o == null)
-        o = component.getValueBinding("label");
+        o = component.getValueExpression ("label");
     }
     return o;
   }
 
   private static void _assertIsValidCustomMessageType(Object customMessagePattern)
   {
-    if (!(customMessagePattern instanceof ValueBinding ||
+    if (!(customMessagePattern instanceof ValueExpression  ||
          customMessagePattern instanceof String))
          throw new IllegalArgumentException("custom message should be of type ValueBinding or String");
   }
@@ -608,7 +609,7 @@
 
     CustomDetailErrorMessage(
       String messageFormat,
-      ValueBinding customDetailErrorMessage,
+      ValueExpression customDetailErrorMessage,
       Object[] parameters,
       boolean hasBoundParameters
     )
@@ -625,7 +626,7 @@
     public String getDetailMessage()
     {
       FacesContext context    = FacesContext.getCurrentInstance();
-      String detailMsgPattern = (String)_customDetailErrorMessage.getValue(context);
+      String detailMsgPattern = (String)_customDetailErrorMessage.getValue(context.getELContext());
       if(detailMsgPattern == null)
       {
         // Set a default message that might get used by FacesException 
@@ -649,7 +650,7 @@
       return _getFormattedString(detailMsgPattern, params);
     }
 
-    private ValueBinding _customDetailErrorMessage;
+    private ValueExpression _customDetailErrorMessage;
     private boolean _hasBoundParameters;
   }
 

Modified: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-build/pom.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-build/pom.xml?view=diff&rev=452744&r1=452743&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-build/pom.xml (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-build/pom.xml Tue Oct  3 22:49:55 2006
@@ -18,7 +18,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad</artifactId>
-    <version>incubator-m1-SNAPSHOT</version>
+    <version>incubator-1.2-m1-SNAPSHOT</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>

Modified: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-demo/pom.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-demo/pom.xml?view=diff&rev=452744&r1=452743&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-demo/pom.xml (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-demo/pom.xml Tue Oct  3 22:49:55 2006
@@ -18,7 +18,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad</artifactId>
-    <version>incubator-m1-SNAPSHOT</version>
+    <version>incubator-1.2-m1-SNAPSHOT</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
@@ -128,14 +128,15 @@
       <dependencies>
 
         <dependency>
-          <groupId>org.apache.myfaces.core</groupId>
-          <artifactId>myfaces-api</artifactId>
+          <groupId>javax.faces</groupId>
+          <artifactId>jsf-api</artifactId>
           <scope>compile</scope>
         </dependency>
 
+
         <dependency>
-          <groupId>org.apache.myfaces.core</groupId>
-          <artifactId>myfaces-impl</artifactId>
+          <groupId>javax.faces</groupId>
+          <artifactId>jsf-impl</artifactId>
           <scope>runtime</scope>
         </dependency>
       </dependencies>

Modified: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/pom.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/pom.xml?view=diff&rev=452744&r1=452743&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/pom.xml (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/pom.xml Tue Oct  3 22:49:55 2006
@@ -18,7 +18,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad</artifactId>
-    <version>incubator-m1-SNAPSHOT</version>
+    <version>incubator-1.2-m1-SNAPSHOT</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
@@ -179,8 +179,8 @@
     </dependency>
 
     <dependency>
-      <groupId>org.apache.myfaces.core</groupId>
-      <artifactId>myfaces-api</artifactId>
+      <groupId>javax.faces</groupId>
+      <artifactId>jsf-api</artifactId>
     </dependency>
 
     <!-- "test" scope dependencies -->
@@ -216,8 +216,8 @@
     </dependency>
 
     <dependency>
-      <groupId>org.apache.myfaces.core</groupId>
-      <artifactId>myfaces-impl</artifactId>
+      <groupId>javax.faces</groupId>
+      <artifactId>jsf-impl</artifactId>
       <scope>test</scope>
     </dependency>
 

Modified: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewHandlerImpl.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewHandlerImpl.java?view=diff&rev=452744&r1=452743&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewHandlerImpl.java (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewHandlerImpl.java Tue Oct  3 22:49:55 2006
@@ -30,6 +30,7 @@
 
 import javax.faces.FacesException;
 import javax.faces.application.ViewHandler;
+import javax.faces.application.ViewHandlerWrapper;
 import javax.faces.component.UIViewRoot;
 import javax.faces.context.ExternalContext;
 import javax.faces.context.FacesContext;
@@ -56,7 +57,7 @@
  *   OK for now, because it's intended for use while developing, not while
  *   deployed - yet it's on all the time.  Hrm.
  */
-public class ViewHandlerImpl extends ViewHandler
+public class ViewHandlerImpl extends ViewHandlerWrapper
 {
   static public final String ALTERNATE_VIEW_HANDLER =
     "org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER";
@@ -69,16 +70,9 @@
     _loadInternalViews();
   }
 
-  @Override
-  public Locale calculateLocale(FacesContext context)
-  {
-    return _delegate.calculateLocale(context);
-  }
-
-  @Override
-  public String calculateRenderKitId(FacesContext context)
+  protected ViewHandler getWrapped()
   {
-    return _delegate.calculateRenderKitId(context);
+    return _delegate;
   }
 
   @Override
@@ -117,13 +111,13 @@
       }
     }
 
-    return _delegate.createView(context, viewId);
+    return super.createView(context, viewId);
   }
 
   @Override
   public String getActionURL(FacesContext context, String viewId)
   {
-    String actionURL = _delegate.getActionURL(context, viewId);
+    String actionURL = super.getActionURL(context, viewId);
     RequestContext afContext = RequestContext.getCurrentInstance();
     if (afContext != null)
     {
@@ -140,7 +134,7 @@
     FacesContext context,
     String       path)
   {
-    return _delegate.getResourceURL(context, path);
+    return super.getResourceURL(context, path);
   }
 
 
@@ -175,7 +169,7 @@
         }
         else
         {
-          _delegate.renderView(context, viewToRender);
+          super.renderView(context, viewToRender);
         }
 
         if (service != null)
@@ -259,7 +253,7 @@
       return null;
     }
 
-    UIViewRoot result = _delegate.restoreView(context, viewId);
+    UIViewRoot result = super.restoreView(context, viewId);
     // If we've successfully restored a view, then assume that
     // this is a postback request.
     if (result != null)
@@ -288,7 +282,7 @@
         service.isStateless(context))
       return;
 
-    _delegate.writeState(context);
+    super.writeState(context);
   }
 
   synchronized private void _initIfNeeded(FacesContext context)

Modified: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/DialogServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/DialogServiceImpl.java?view=diff&rev=452744&r1=452743&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/DialogServiceImpl.java (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/DialogServiceImpl.java Tue Oct  3 22:49:55 2006
@@ -209,8 +209,9 @@
     FacesContext context = _getFacesContext();
     if (TrinidadFilterImpl.isExecutingDialogReturn(context))
     {
-      Map<String, Object> parameterMap = context.getExternalContext().getRequestParameterMap();
-      Object returnParam = parameterMap.get(_RETURN_PARAM);
+      Map<String, String> parameterMap =
+        context.getExternalContext().getRequestParameterMap();
+      String returnParam = parameterMap.get(_RETURN_PARAM);
       if (returnParam == null)
         return null;
 

Modified: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java?view=diff&rev=452744&r1=452743&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java Tue Oct  3 22:49:55 2006
@@ -19,6 +19,8 @@
 
 import java.util.Iterator;
 
+import javax.el.ELContext;
+
 import javax.faces.application.Application;
 import javax.faces.application.FacesMessage;
 import javax.faces.component.UIViewRoot;
@@ -208,6 +210,12 @@
     public void responseComplete()
     {
       _base.responseComplete();
+    }
+
+
+    public ELContext getELContext()
+    {
+      return _base.getELContext();
     }
 
     private final FacesContext    _base;

Modified: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java?view=diff&rev=452744&r1=452743&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java Tue Oct  3 22:49:55 2006
@@ -195,7 +195,7 @@
     if (Boolean.TRUE.equals(requestMap.get(FORCED_PARTIAL_KEY)))
       return true;
     
-    Map<String, Object> parameters = context.getExternalContext().getRequestParameterMap();
+    Map<String, String> parameters = context.getExternalContext().getRequestParameterMap();
     if ("true".equals(parameters.get(XhtmlConstants.PARTIAL_PARAM)))
       return true;
 

Modified: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/DateTimeConverter.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/DateTimeConverter.java?view=diff&rev=452744&r1=452743&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/DateTimeConverter.java (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/DateTimeConverter.java Tue Oct  3 22:49:55 2006
@@ -157,8 +157,7 @@
     {
       // =-=AEW Only if Javascript...
       // -= Simon Lessard =-
-      // FIXME: JSF 1.2 specifies <String, Object>
-      Map<Object, Object> requestMap = context.getExternalContext().getRequestMap();
+      Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
 
       // this fetch could be at the place where we append, but has been
       // moved ahead to optimize use of StringBuffer
@@ -515,7 +514,7 @@
 
   // RenderingContext key indicating the _dateFormat object
   // has been created
-  private static final Object _PATTERN_WRITTEN_KEY = "org.apache.myfaces.trinidadinternal.convert.DateTimeConverter._PATTERN_WRITTEN";
+  private static final String _PATTERN_WRITTEN_KEY = "org.apache.myfaces.trinidadinternal.convert.DateTimeConverter._PATTERN_WRITTEN";
 
   // String indicating that NO_JS_PATTERN is available
   private static final String _NO_JS_PATTERN = new String();

Modified: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/ResponseWriterDecorator.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/ResponseWriterDecorator.java?view=diff&rev=452744&r1=452743&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/ResponseWriterDecorator.java (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/ResponseWriterDecorator.java Tue Oct  3 22:49:55 2006
@@ -124,6 +124,15 @@
     getResponseWriter().writeComment(comment);
   }
 
+
+
+  @Override
+  public void writeText(Object text, UIComponent component, 
+                        String propertyName)
+    throws IOException
+  {
+    getResponseWriter().writeText(text, component, propertyName);
+  }
   
   @Override
   public void writeText(Object text, String componentPropertyName) throws IOException

Modified: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/htmlBasic/ComponentFacesBean.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/htmlBasic/ComponentFacesBean.java?view=diff&rev=452744&r1=452743&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/htmlBasic/ComponentFacesBean.java (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/htmlBasic/ComponentFacesBean.java Tue Oct  3 22:49:55 2006
@@ -18,6 +18,8 @@
 import java.util.Iterator;
 import java.util.Set;
 
+import javax.el.ValueExpression;
+
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.el.ValueBinding;
@@ -66,9 +68,20 @@
     throw new UnsupportedOperationException();
   }
 
+
   final public ValueBinding getValueBinding(PropertyKey key)
   {
     return _component.getValueBinding(key.getName());
+  }
+
+  final public ValueExpression getValueExpression(PropertyKey key)
+  {
+    return _component.getValueExpression(key.getName());
+  }
+
+  final public void setValueExpression(PropertyKey key, ValueExpression expression)
+  {
+    throw new UnsupportedOperationException();
   }
 
   final public Object getRawProperty(PropertyKey key)

Modified: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/UINodeFacesBean.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/UINodeFacesBean.java?view=diff&rev=452744&r1=452743&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/UINodeFacesBean.java (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/UINodeFacesBean.java Tue Oct  3 22:49:55 2006
@@ -18,7 +18,7 @@
 import java.util.HashSet;
 import java.util.Set;
 
-import javax.faces.el.ValueBinding;
+import javax.el.ValueExpression;
 
 
 import org.apache.myfaces.trinidad.bean.FacesBean;
@@ -167,14 +167,14 @@
         AttributeKey attrKey = getAttributeKey(key);
         if (attrKey != null)
         {
-          // We're no longer shadowing a ValueBinding (if one's present);
+          // We're no longer shadowing a ValueExpression (if one's present);
           // re-establish that binding, or reset to null
           Object attrValue;
-          ValueBinding binding = getValueBinding(key);
-          if (binding == null)
+          ValueExpression expression = getValueExpression(key);
+          if (expression == null)
             attrValue = null;
           else
-            attrValue = new ValueBindingBoundValue(binding);
+            attrValue = new ValueExpressionBoundValue(expression);
 
           _node.setAttributeValue(attrKey, attrValue);
         }
@@ -185,10 +185,9 @@
     };
   }
 
-  @Override
-  protected PropertyMap createBindingsMap()
+  protected PropertyMap createExpressionMap()
   {
-    FlaggedPropertyMap bindings = new FlaggedPropertyMap()
+    FlaggedPropertyMap expressions = new FlaggedPropertyMap()
     {
       @Override
       public Object put(PropertyKey key, Object value)
@@ -204,12 +203,12 @@
           if (attrKey != null)
           {
             // If there's no local value, then we're not shadowing;
-            // set up a new ValueBindingBoundValue
+            // set up a new ValueExpressionBoundValue
             if (getLocalProperty(key) == null)
             {
-              ValueBinding binding = (ValueBinding) value;
+              ValueExpression expression = (ValueExpression) value;
               _node.setAttributeValue(attrKey,
-                                      new ValueBindingBoundValue(binding));
+                                      new ValueExpressionBoundValue(expression));
             }
           }
 
@@ -236,8 +235,7 @@
       }
     };
 
-    bindings.setUseStateHolder(true);
-    return bindings;
+    return expressions;
   }
 
 

Copied: incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/ValueExpressionBoundValue.java (from r452637, incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/ValueBindingBoundValue.java)
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/ValueExpressionBoundValue.java?view=diff&rev=452744&p1=incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/ValueBindingBoundValue.java&r1=452637&p2=incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/ValueExpressionBoundValue.java&r2=452744
==============================================================================
--- incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/ValueBindingBoundValue.java (original)
+++ incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/ValueExpressionBoundValue.java Tue Oct  3 22:49:55 2006
@@ -16,19 +16,19 @@
 package org.apache.myfaces.trinidadinternal.uinode;
 
 import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
+import javax.el.ValueExpression;
 
 import org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext;
 import org.apache.myfaces.trinidadinternal.ui.data.BoundValue;
 
-class ValueBindingBoundValue implements BoundValue
+class ValueExpressionBoundValue implements BoundValue
 {
-  public ValueBindingBoundValue(ValueBinding binding)
+  public ValueExpressionBoundValue(ValueExpression expression)
   {
-    if (binding == null)
+    if (expression == null)
       throw new NullPointerException();
 
-    _binding = binding;
+    _expression = expression;
   }
 
   /**
@@ -37,8 +37,8 @@
   public Object getValue(UIXRenderingContext rContext)
   {
     FacesContext fContext = FacesContext.getCurrentInstance();
-    return _binding.getValue(fContext);
+    return _expression.getValue(fContext.getELContext());
   }
 
-  private final ValueBinding _binding;
+  private final ValueExpression _expression;
 }



Mime
View raw message