You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-commits@incubator.apache.org by aw...@apache.org on 2006/12/15 02:17:23 UTC

svn commit: r487429 [6/44] - in /incubator/adffaces/branches/faces-1_2-061214: plugins/maven-faces-plugin/ plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/ plugins/maven-faces-plugin/src/main/java/org/apache/myfac...

Modified: incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/conf/META-INF/tr-base.tld
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/conf/META-INF/tr-base.tld?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/conf/META-INF/tr-base.tld (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/conf/META-INF/tr-base.tld Thu Dec 14 18:16:57 2006
@@ -14,200 +14,136 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<!DOCTYPE taglib 
-   PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
-          "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
-<taglib>
+<taglib
+  xmlns="http://java.sun.com/xml/ns/javaee"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
+  version="2.1">
+
+  <display-name>Apache Trinidad Core</display-name>    
   <tlib-version>11-m3</tlib-version>
-  <jsp-version>1.2</jsp-version>
   <short-name>tr</short-name>
   <uri>http://myfaces.apache.org/trinidad</uri>
-  <display-name>Apache Trinidad Core</display-name>    
         
-    <tag>
-      <name>attribute</name>   
-      <tag-class>org.apache.myfaces.trinidadinternal.taglib.AttributeTag</tag-class>
-      <body-content>empty</body-content>
-      <description>
-        The Attribute tag adds a property with the specified name and value 
-        to the component associated with the parent tag.  It behaves the same
-        as the JSF Attribute tag except that it creates a value binding for 
-        expressions instead of immediately evaluating it.  
-      </description>
-      <attribute>
-        <name>name</name>
-        <rtexprvalue>false</rtexprvalue>
-        <description>
-          the name of the attribute
-        </description>
-      </attribute>
-      <attribute>
-        <name>value</name>
-        <rtexprvalue>false</rtexprvalue>
-        <description>
-          the value of the attribute
-        </description>
-      </attribute>
-    </tag>
-    
-
-    <tag>
-      <name>validator</name>   
-      <tag-class>org.apache.myfaces.trinidadinternal.taglib.ValidatorTag</tag-class>
-      <body-content>empty</body-content>
-      <description>
-        The Validator tag adds a new validator instance to the component
-        associated with the parent tag. The new validator instance is found
-        by evaluating a binding expression, or looking up a validator ID.
-        This implements the JSF 1.2 definition of &lt;f:validator&gt;.
-      </description>
-      <attribute>
-        <name>validatorId</name>
-        <rtexprvalue>false</rtexprvalue>
-        <description>
-          the ID of a validator instance registered in faces-config.xml
-        </description>
-      </attribute>
-      <attribute>
-        <name>binding</name>
-        <rtexprvalue>false</rtexprvalue>
-        <description>
-          the value binding expression to a property that returns a
-          ValidatorInstance.
-        </description>
-      </attribute>
-    </tag>        
-
    <tag>
       <name>forEach</name>
       <tag-class>org.apache.myfaces.trinidadinternal.taglib.ForEachTag</tag-class>
       <description>
-The forEach tag is a replacement for the JSTL &amp;lt;c:forEach&amp;gt; tag
-                that works with Apache Trinidad components.  Today, &amp;lt;c:forEach&amp;gt; cannot
-                be used with any JSF components or tags.  This tag brings that functionality
-        to JSF, but it is limited to Apache Trinidad tags. This tag also has several limitations not found in &amp;lt;c:forEach&amp;gt;:
-        &lt;ul&gt;
-        &lt;li&gt;&amp;lt;tr:forEach&amp;gt; does not currently support scenarios where the size of the "items" list or array changes from one request to the next. It may be possible to work around this in specific scenarios by manually deleting all children of the parent component (&amp;lt;tr:selectOneListbox&amp;gt; in the above example), but this has not yet been tested.&lt;/li&gt;
-        &lt;li&gt;&amp;lt;tr:forEach&amp;gt; does not support arbitrary java.util.Collections; it can only iterate over java.util.Lists or arrays.&lt;/li&gt;
-        &lt;li&gt;&amp;lt;tr:forEach&amp;gt; executes at the time the JSP tag executes. So it 
-        does not have access to any EL variables that are created by JSF components.
-        For example, the &amp;lt;tr:table&amp;gt; creates an EL variable using the value of
-        the "var" attribute. However, this EL variable is not available 
-to &amp;lt;tr:forEach&amp;gt;     
-        &lt;/li&gt;
-        &lt;/ul&gt;
+The forEach tag is a replacement for the JSTL &amp;lt;c:forEach&amp;gt; tag. 
+As of JSF 1.2/JSP 2.1/JSTL 1.2, the regular &amp;lt;c:forEach&amp;gt; tag
+does work with JSF components.  However, it does not support varStatus
+with JSF!  (Unlike c:forEach, tr:forEach doesn't currently support anything
+for "items" other than arrays and lists.)
       </description>
 
       <attribute>
-        <name>items</name>
-        <rtexprvalue>false</rtexprvalue>
         <description>
           the items over which iteration takes place 
         </description>
+        <name>items</name>
+        <deferred-value/>
       </attribute>
 
       <attribute>
-        <name>var</name>
-        <rtexprvalue>false</rtexprvalue>
         <description>
           the name of the variable to expose
         </description>
+        <name>var</name>
+        <rtexprvalue>false</rtexprvalue>
       </attribute>
 
       <attribute>
-        <name>varStatus</name>
-        <rtexprvalue>false</rtexprvalue>
         <description>
           Name of the exported scoped variable for the
           status of the iteration.
         </description>
+        <name>varStatus</name>
+        <rtexprvalue>false</rtexprvalue>
       </attribute>
 
       <attribute>
-        <name>begin</name>
-        <rtexprvalue>false</rtexprvalue>
         <description>
           the beginning index 
         </description>
+        <name>begin</name>
+        <rtexprvalue>false</rtexprvalue>
       </attribute>
 
       <attribute>
-        <name>end</name>
-        <rtexprvalue>false</rtexprvalue>
         <description>
           the ending index 
         </description>
+        <name>end</name>
+        <rtexprvalue>false</rtexprvalue>
       </attribute>
 
       <attribute>
-        <name>step</name>
-        <rtexprvalue>false</rtexprvalue>
         <description>
           the number of steps per iteration
         </description>
+        <name>step</name>
+        <rtexprvalue>false</rtexprvalue>
       </attribute>
 
    </tag>
-
+
    <tag>
-      <name>setActionListener</name>
-      <tag-class>org.apache.myfaces.trinidadinternal.taglib.listener.SetActionListenerTag</tag-class>
-      <body-content>empty</body-content>
       <description>
         The setActionListener tag provides a declarative syntax for assigning values before an action fires
       </description>
 
+      <name>setActionListener</name>
+      <tag-class>org.apache.myfaces.trinidadinternal.taglib.listener.SetActionListenerTag</tag-class>
+      <body-content>empty</body-content>
       <attribute>
-        <name>to</name>
-        <required>true</required>
-        <rtexprvalue>false</rtexprvalue>
         <description>
           the target for the value;  must be an EL expression
         </description>
+        <name>to</name>
+        <required>true</required>
+        <deferred-value/>
       </attribute>
 
       <attribute>
-        <name>from</name>
-        <required>true</required>
-        <rtexprvalue>false</rtexprvalue>
         <description>
           the source of the value;  can be an EL expression or a constant value
         </description>
+        <name>from</name>
+        <required>true</required>
+        <deferred-value/>
       </attribute>
    </tag>
 
    <tag>
-      <name>returnActionListener</name>
-      <tag-class>org.apache.myfaces.trinidadinternal.taglib.listener.ReturnActionListenerTag</tag-class>
-      <body-content>empty</body-content>
       <description>
         The returnActionListener tag is a declarative way to allow an action source to return 
         a value from a dialog or process.
       </description>
+      <name>returnActionListener</name>
+      <tag-class>org.apache.myfaces.trinidadinternal.taglib.listener.ReturnActionListenerTag</tag-class>
+      <body-content>empty</body-content>
 
       <attribute>
-        <name>value</name>
-        <rtexprvalue>false</rtexprvalue>
         <description>
           The value to return as the dialog/process result.
           This can be an EL expression or a constant value.
         </description>
+        <name>value</name>
+        <deferred-value/>
       </attribute>
    </tag>
 
 
    <tag>
-      <name>resetActionListener</name>
-      <tag-class>org.apache.myfaces.trinidadinternal.taglib.listener.ResetActionListenerTag</tag-class>
-      <body-content>empty</body-content>
       <description>
         The resetActionListener tag provides a declarative syntax for resetting values before an action fires
       </description>
+      <name>resetActionListener</name>
+      <tag-class>org.apache.myfaces.trinidadinternal.taglib.listener.ResetActionListenerTag</tag-class>
+      <body-content>empty</body-content>
    </tag>
  
    <tag>
-      <name>componentRef</name>
-      <tag-class>org.apache.myfaces.trinidadinternal.taglib.ComponentRefTag</tag-class>
       <description> 
 
       The componentRef tag adds declarative components onto the current
@@ -217,69 +153,68 @@
 
       </description>
 
+      <name>componentRef</name>
+      <tag-class>org.apache.myfaces.trinidadinternal.taglib.ComponentRefTag</tag-class>
       <attribute>
-        <name>componentType</name>
-        <required>true</required>
-        <rtexprvalue>false</rtexprvalue>
         <description>
 Identifies which declarative component to use. 
 All the available components must be
 declared in a region-metadata.xml file.
         </description>
+        <name>componentType</name>
+        <required>true</required>
+        <deferred-value/>
       </attribute>
 
       <attribute>
-        <name>id</name>
-        <required>true</required>
-        <rtexprvalue>false</rtexprvalue>
         <description>
           This ID must be unique within this page. 
         </description>
+        <name>id</name>
+        <required>true</required>
       </attribute>
 
       <attribute>
-        <name>value</name>
-        <required>false</required>
-        <rtexprvalue>false</rtexprvalue>
         <description>
           A value to pass to the component definition.
         </description>
+        <name>value</name>
+        <required>false</required>
+        <deferred-value/>
       </attribute>
 
       <attribute>
-        <name>rendered</name>
-        <required>false</required>
-        <rtexprvalue>false</rtexprvalue>
         <description>
           Whether or not this component is rendered.
         </description>
+        <name>rendered</name>
+        <required>false</required>
+        <deferred-value/>
       </attribute>
 
    </tag>
 
 
     <tag>
-      <name>componentDef</name>   
-      <tag-class>org.apache.myfaces.trinidadinternal.taglib.ComponentDefTag</tag-class>
       <description>
         The componentDef tag is used to define a component. Its primary purpose
 is defining a "var" property so that the definition can refer to attributes
 on this component's usage.
       </description>
+      <name>componentDef</name>   
+      <tag-class>org.apache.myfaces.trinidadinternal.taglib.ComponentDefTag</tag-class>
       <attribute>
-        <name>var</name>
-        <rtexprvalue>false</rtexprvalue>
         <description>
           the variable name to use when referencing attributes, that may be set
           on this new component.
         </description>
+        <name>var</name>
+        <rtexprvalue>false</rtexprvalue>
       </attribute>
     </tag>        
 
 
     <tag>
-      <name>facetRef</name>   
-      <tag-class>org.apache.myfaces.trinidadinternal.taglib.FacetRefTag</tag-class>
       <description>
         The facetRef tag is used to copy facets from a component
         and paste them into its
@@ -289,12 +224,14 @@
         &lt;tr:componentDef&gt;. In other words, a single facet cannot be
         used more than once.
       </description>
+      <name>facetRef</name>   
+      <tag-class>org.apache.myfaces.trinidadinternal.taglib.FacetRefTag</tag-class>
       <attribute>
-        <name>facetName</name>
-        <rtexprvalue>false</rtexprvalue>
         <description>
           the facet name to copy
         </description>
+        <name>facetName</name>
+        <rtexprvalue>false</rtexprvalue>
       </attribute>
     </tag>        
 

Modified: incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/conf/META-INF/trh-base.tld
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/conf/META-INF/trh-base.tld?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/conf/META-INF/trh-base.tld (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/conf/META-INF/trh-base.tld Thu Dec 14 18:16:57 2006
@@ -14,13 +14,13 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<!DOCTYPE taglib 
-   PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
-          "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
-<taglib>
+<taglib
+  xmlns="http://java.sun.com/xml/ns/javaee"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
+  version="2.1">
+  <display-name>Apache Trinidad HTML</display-name>
   <tlib-version>11-m3</tlib-version>
-  <jsp-version>1.2</jsp-version>
   <short-name>trh</short-name>
   <uri>http://myfaces.apache.org/trinidad/html</uri>
-  <display-name>Apache Trinidad HTML</display-name>
 </taglib>

Modified: incubator/adffaces/branches/faces-1_2-061214/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-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewHandlerImpl.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewHandlerImpl.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewHandlerImpl.java Thu Dec 14 18:16:57 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;
@@ -53,10 +54,9 @@
  * @todo Rename something less generic
  * @todo Support extension mapping (*.faces)
  * @todo The modification detection only works for a single user.  That's
- *   OK for now, because it's intended for use while developing, not while
- *   deployed - yet it's on all the time.  Hrm.
+ *   OK for now, because it's intended for use while developing
  */
-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 +69,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 +110,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 +133,7 @@
     FacesContext context,
     String       path)
   {
-    return _delegate.getResourceURL(context, path);
+    return super.getResourceURL(context, path);
   }
 
 
@@ -175,7 +168,7 @@
         }
         else
         {
-          _delegate.renderView(context, viewToRender);
+          super.renderView(context, viewToRender);
         }
 
         if (service != null)
@@ -259,7 +252,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 +281,7 @@
         service.isStateless(context))
       return;
 
-    _delegate.writeState(context);
+    super.writeState(context);
   }
 
   synchronized private void _initIfNeeded(FacesContext context)

Modified: incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/binding/AccessKeyBinding.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/binding/AccessKeyBinding.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/binding/AccessKeyBinding.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/binding/AccessKeyBinding.java Thu Dec 14 18:16:57 2006
@@ -15,8 +15,11 @@
  */
 package org.apache.myfaces.trinidadinternal.binding;
 
-import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
+import java.io.Serializable;
+
+import javax.el.ValueExpression;
+import javax.el.ELContext;
+import javax.el.PropertyNotWritableException;
 
 import org.apache.myfaces.trinidadinternal.util.nls.StringUtils;
 
@@ -27,25 +30,25 @@
  *
  * @author The Oracle ADF Faces Team
  */
-public class AccessKeyBinding extends ValueBindingAdapter
+public class AccessKeyBinding extends ValueExpression implements Serializable
 {
   /**
    * Constructor purely for serialization.
    */
   public AccessKeyBinding()
   {
-    super(null);
   }
 
-  public AccessKeyBinding(ValueBinding base)
+  public AccessKeyBinding(ValueExpression expr)
   {
-    super(base);
+    _base = expr;
   }
 
+
   @Override
-  public Object getValue(FacesContext context)
+  public Object getValue(ELContext context)
   {
-    Object o = super.getValue(context);
+    Object o = _base.getValue(context);
     if (o == null)
       return null;
 
@@ -58,8 +61,51 @@
   }
 
   @Override
-  public Class<?> getType(FacesContext context)
+  public void setValue(ELContext context, Object value)
+  {
+    throw new PropertyNotWritableException();
+  }
+
+  @Override
+  public Class<?> getType(ELContext context)
+  {
+    return Character.class;
+  }
+
+  @Override
+  public Class<?> getExpectedType()
   {
     return Character.class;
   }
+
+  @Override
+  public boolean isReadOnly(ELContext context)
+  {
+    return true;
+  }
+
+
+  @Override
+  public boolean isLiteralText()
+  {
+    return false;
+  }
+
+  @Override
+  public String getExpressionString()
+  {
+    return null;
+  }
+
+  public int hashCode()
+  {
+    return 0;
+  }
+
+  public boolean equals(Object o)
+  {
+    return (o == this);
+  }
+
+  private ValueExpression _base;
 }

Modified: incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/binding/StripAccessKeyBinding.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/binding/StripAccessKeyBinding.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/binding/StripAccessKeyBinding.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/binding/StripAccessKeyBinding.java Thu Dec 14 18:16:57 2006
@@ -15,8 +15,11 @@
  */
 package org.apache.myfaces.trinidadinternal.binding;
 
-import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
+import java.io.Serializable;
+
+import javax.el.ValueExpression;
+import javax.el.ELContext;
+import javax.el.PropertyNotWritableException;
 
 import org.apache.myfaces.trinidadinternal.util.nls.StringUtils;
 
@@ -27,25 +30,18 @@
  *
  * @author The Oracle ADF Faces Team
  */
-public class StripAccessKeyBinding extends ValueBindingAdapter
+public class StripAccessKeyBinding extends ValueExpression implements Serializable
 {
-  /**
-   * Constructor purely for serialization.
-   */
-  public StripAccessKeyBinding()
-  {
-    super(null);
-  }
 
-  public StripAccessKeyBinding(ValueBinding base)
+  public StripAccessKeyBinding(ValueExpression base)
   {
-    super(base);
+    _base = base;
   }
 
   @Override
-  public Object getValue(FacesContext context)
+  public Object getValue(ELContext context)
   {
-    Object o = super.getValue(context);
+    Object o = _base.getValue(context);
     if (o == null)
       return null;
 
@@ -58,8 +54,50 @@
   }
 
   @Override
-  public Class<?> getType(FacesContext context)
+  public void setValue(ELContext context, Object value)
+  {
+    throw new PropertyNotWritableException();
+  }
+
+  @Override
+  public Class<?> getType(ELContext context)
+  {
+    return Character.class;
+  }
+
+  @Override
+  public Class<?> getExpectedType()
+  {
+    return Character.class;
+  }
+
+  @Override
+  public boolean isReadOnly(ELContext context)
   {
-    return String.class;
+    return true;
   }
+
+  @Override
+  public boolean isLiteralText()
+  {
+    return false;
+  }
+
+  @Override
+  public String getExpressionString()
+  {
+    return null;
+  }
+
+  public int hashCode()
+  {
+    return 0;
+  }
+
+  public boolean equals(Object o)
+  {
+    return (o == this);
+  }
+
+  private ValueExpression _base;
 }

Modified: incubator/adffaces/branches/faces-1_2-061214/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-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/DialogServiceImpl.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/DialogServiceImpl.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/DialogServiceImpl.java Thu Dec 14 18:16:57 2006
@@ -21,10 +21,11 @@
 import java.util.List;
 import java.util.Map;
 
+import javax.el.ValueExpression;
+
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIViewRoot;
 import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
 import javax.faces.render.RenderKit;
 
 import org.apache.myfaces.trinidad.context.RequestContext;
@@ -209,8 +210,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;
 
@@ -409,9 +411,9 @@
   @SuppressWarnings("unchecked")
   private void _executeBindings(FacesContext context, UIComponent component)
   {
-    ValueBinding binding = component.getValueBinding("binding");
-    if (binding != null)
-      binding.setValue(context, component);
+    ValueExpression expression = component.getValueExpression("binding");
+    if (expression != null)
+      expression.setValue(context.getELContext(), component);
 
     Iterator<UIComponent> kids = component.getFacetsAndChildren();
     while (kids.hasNext())

Modified: incubator/adffaces/branches/faces-1_2-061214/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-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java Thu Dec 14 18:16:57 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-061214/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-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java Thu Dec 14 18:16:57 2006
@@ -196,7 +196,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-061214/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-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/DateTimeConverter.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/DateTimeConverter.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/DateTimeConverter.java Thu Dec 14 18:16:57 2006
@@ -30,7 +30,7 @@
 import javax.faces.context.FacesContext;
 import javax.faces.convert.Converter;
 import javax.faces.convert.ConverterException;
-import javax.faces.el.ValueBinding;
+import javax.el.ValueExpression;
 
 import org.apache.myfaces.trinidad.context.RenderingContext;
 import org.apache.myfaces.trinidad.convert.ClientConverter;
@@ -107,10 +107,10 @@
       UIComponent component, String strValue, Object value)
   {
     assert value != null;
-    ValueBinding binding = component.getValueBinding("value");
-    if (binding != null)
+    ValueExpression expression = component.getValueExpression("value");
+    if (expression != null)
     {
-      Class<?> expectedType = binding.getType(context);
+      Class<?> expectedType = expression.getType(context.getELContext());
       // Sometimes the type might be null, if it cannot be determined:
       if ((expectedType != null)
           && (!expectedType.isAssignableFrom(value.getClass())))
@@ -157,10 +157,8 @@
     if (clientId != null)
     {
       // =-=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
@@ -517,7 +515,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-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/ReturnActionListenerTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/ReturnActionListenerTag.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/ReturnActionListenerTag.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/ReturnActionListenerTag.java Thu Dec 14 18:16:57 2006
@@ -55,10 +55,10 @@
       ValueExpression valueExp = _value.getValueExpression(faceletContext, Object.class);
       ActionSource actionSource = (ActionSource)parent;
       ReturnActionListener listener = new ReturnActionListener();
-      listener.setValueBinding(ReturnActionListener.VALUE_KEY, new LegacyValueBinding(valueExp));
+      listener.setValueExpression(ReturnActionListener.VALUE_KEY, valueExp);
       actionSource.addActionListener(listener);
     }
   }
 
   private final TagAttribute _value;
-}
\ No newline at end of file
+}

Modified: incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/SetActionListenerTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/SetActionListenerTag.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/SetActionListenerTag.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/SetActionListenerTag.java Thu Dec 14 18:16:57 2006
@@ -24,14 +24,12 @@
 
 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;
 
 /**
- * @todo it should be removed after we consume JSF1.2.
  * @author Emmanuel Pirsch
  */
 public class SetActionListenerTag extends TagHandler
@@ -57,10 +55,10 @@
                                                             Object.class);
       ActionSource actionSource= (ActionSource) parent;
       SetActionListener listener = new SetActionListener();
-      listener.setValueBinding(SetActionListener.FROM_KEY,
-                               new LegacyValueBinding(fromExpression));
-      listener.setValueBinding(SetActionListener.TO_KEY,
-                               new LegacyValueBinding(toExpression));
+      listener.setValueExpression(SetActionListener.FROM_KEY,
+                                  fromExpression);
+      listener.setValueExpression(SetActionListener.TO_KEY,
+                                  toExpression);
       actionSource.addActionListener(listener);
     }
   }

Modified: incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/TrinidadListenersTagRule.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/TrinidadListenersTagRule.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/TrinidadListenersTagRule.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/facelets/TrinidadListenersTagRule.java Thu Dec 14 18:16:57 2006
@@ -39,9 +39,9 @@
 {
   public static final MetaRule Instance = new TrinidadListenersTagRule();
 
-  private static class ListenerPropertyMetadata extends Metadata
+  private static class ListenerMBPropertyMetadata extends Metadata
   {
-    public ListenerPropertyMetadata(Method method, TagAttribute attribute, Class[] paramList)
+    public ListenerMBPropertyMetadata(Method method, TagAttribute attribute, Class[] paramList)
     {
       _method = method;
       _attribute = attribute;
@@ -74,6 +74,42 @@
     private final TagAttribute _attribute;
     private       Class[]      _paramList;
   }
+
+  private static class ListenerMEPropertyMetadata extends Metadata
+  {
+    public ListenerMEPropertyMetadata(Method method, TagAttribute attribute, Class[] paramList)
+    {
+      _method = method;
+      _attribute = attribute;
+      _paramList = paramList;
+    }
+    
+    @Override
+    @SuppressWarnings("deprecation")
+    public void applyMetadata(FaceletContext ctx, Object instance)
+    {
+      MethodExpression expr =
+        _attribute.getMethodExpression(ctx, null, _paramList);
+      
+      try
+      {
+        _method.invoke(instance,
+                       new Object[]{expr});
+      }
+      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       Class[]      _paramList;
+  }
    
 
   @Override
@@ -82,7 +118,11 @@
      TagAttribute attribute,
      MetadataTarget meta)
   {
-    if ((meta.getPropertyType(name) == MethodBinding.class) &&
+    Class metaType = meta.getPropertyType(name);
+    boolean isMethodBinding = (metaType == MethodBinding.class);
+    boolean isMethodExpression = (metaType == MethodExpression.class);
+
+    if ((isMethodBinding || isMethodExpression) &&
         name.endsWith("Listener"))
     {
       // OK, we're trying to call setFooListener()
@@ -110,8 +150,12 @@
           return null;
 
         // And go
-        return new ListenerPropertyMetadata(m, attribute,
-                                            new Class[]{eventClass});
+        if (isMethodBinding)
+          return new ListenerMBPropertyMetadata(m, attribute,
+                                                new Class[]{eventClass});
+        else
+          return new ListenerMEPropertyMetadata(m, attribute,
+                                                new Class[]{eventClass});
       }
     }
     return null;

Modified: incubator/adffaces/branches/faces-1_2-061214/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-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/ResponseWriterDecorator.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/ResponseWriterDecorator.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/ResponseWriterDecorator.java Thu Dec 14 18:16:57 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-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/MenuUtils.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/MenuUtils.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/MenuUtils.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/MenuUtils.java Thu Dec 14 18:16:57 2006
@@ -31,8 +31,6 @@
 import java.util.Set;
 
 import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
-
 import javax.faces.webapp.UIComponentTag;
 
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
@@ -48,7 +46,7 @@
   MenuUtils() {}
 
   //=======================================================================
-  // Bound Value/EL Binding utilities
+  // Bound Value/EL Expression utilities
   //=======================================================================
   
   /**
@@ -62,12 +60,10 @@
     
     try
     {
-      // Value of rendered is EL method binding, so we 
-      // need to evaluate it
-      FacesContext ctx     = FacesContext.getCurrentInstance();
-      ValueBinding binding = 
-                        ctx.getApplication().createValueBinding(elExpression);
-      retVal               = binding.getValue(ctx);
+      FacesContext ctx = FacesContext.getCurrentInstance();
+      return ctx.getApplication().evaluateExpressionGet(ctx,
+                                                        elExpression,
+                                                        null);
     }
     catch (Exception ex)
     {
@@ -75,7 +71,6 @@
                   " is invalid or returned a bad value.\n", ex);
       return null;
     }
-    return retVal;
   }
   
   /**

Modified: incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreResponseStateManager.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreResponseStateManager.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreResponseStateManager.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreResponseStateManager.java Thu Dec 14 18:16:57 2006
@@ -67,7 +67,8 @@
     ResponseWriter rw = context.getResponseWriter();
     rw.startElement("input", null);
     rw.writeAttribute("type", "hidden", null);
-    rw.writeAttribute("name", _STATE_FIELD_NAME, null);
+    rw.writeAttribute("name", VIEW_STATE_PARAM, null);
+    rw.writeAttribute("id", VIEW_STATE_PARAM, null);
 
     String s = encodeSerializedViewAsString(serializedView);
     rw.writeAttribute("value", s, null);
@@ -75,6 +76,16 @@
     rw.endElement("input");
   }
 
+  @Override
+  /**
+   * A request is a postback if it contains the state parameter.
+   */
+  public boolean isPostback(FacesContext context)
+  {
+    Map requestParams = context.getExternalContext().getRequestParameterMap();
+    return requestParams.containsKey(VIEW_STATE_PARAM);
+  }
+
 
   protected String encodeSerializedViewAsString(
     StateManager.SerializedView serializedView) throws IOException
@@ -144,7 +155,7 @@
       Map<String, String> requestParamMap =
          context.getExternalContext().getRequestParameterMap();
 
-      String stateString = requestParamMap.get(_STATE_FIELD_NAME);
+      String stateString = requestParamMap.get(VIEW_STATE_PARAM);
       if (stateString == null)
         return null;
 
@@ -194,8 +205,6 @@
 
     return view;
   }
-
-  static private final String _STATE_FIELD_NAME = "org.apache.myfaces.trinidad.faces.STATE";
 
 
   /* Test code for dumping out the page's state

Modified: incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/EditableValueRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/EditableValueRenderer.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/EditableValueRenderer.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/EditableValueRenderer.java Thu Dec 14 18:16:57 2006
@@ -19,12 +19,13 @@
 
 import java.util.Iterator;
 
+import javax.el.ValueExpression;
+
 import javax.faces.component.EditableValueHolder;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.convert.Converter;
 import javax.faces.convert.ConverterException;
-import javax.faces.el.ValueBinding;
 import javax.faces.validator.Validator;
 
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
@@ -227,15 +228,15 @@
     if (Boolean.TRUE.equals(o))
       return true;
 
-    // Now, if the ValueBinding underlying the value says it's
+    // Now, if the ValueExpression underlying the value says it's
     // read-only, then again, it is.
-    ValueBinding vb = getValueBinding(bean);
-    if ((vb != null) && vb.isReadOnly(context))
+    ValueExpression ve = getValueExpression(bean);
+    if ((ve != null) && ve.isReadOnly(context.getELContext()))
     {
       if (_LOG.isFiner())
       {
         _LOG.finer("Value expression {0} is read-only",
-                   vb.getExpressionString());
+                   ve.getExpressionString());
       }
 
       return true;

Modified: incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputColorRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputColorRenderer.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputColorRenderer.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputColorRenderer.java Thu Dec 14 18:16:57 2006
@@ -74,7 +74,7 @@
   {
     FacesBean bean = getFacesBean(component);
     // If there's a non-default action, then just launch away
-    if (getAction(bean) != null)
+    if (getActionExpression(bean) != null)
     {
       super.queueActionEvent(context, component);
     }
@@ -295,7 +295,7 @@
     // If the field has an action, use the default behavior.  Or,
     // if the field doesn't support launching a window at all,
     // use the default behavior.
-    if ((getAction(bean) != null) ||
+    if ((getActionExpression(bean) != null) ||
         !Boolean.TRUE.equals(
             arc.getAgent().getCapabilities().get(TrinidadAgent.CAP_MULTIPLE_WINDOWS)))
       return super.getLaunchOnclick(context, arc, component, bean);

Modified: incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputDateRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputDateRenderer.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputDateRenderer.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputDateRenderer.java Thu Dec 14 18:16:57 2006
@@ -74,7 +74,7 @@
   {
     FacesBean bean = getFacesBean(component);
     // If there's a non-default action, then just launch away
-    if (getAction(bean) != null)
+    if (getActionExpression(bean) != null)
     {
       super.queueActionEvent(context, component);
     }
@@ -349,7 +349,7 @@
     // If the field has an action, use the default behavior.  Or,
     // if the field doesn't support launching a window at all,
     // use the default behavior.
-    if ((getAction(bean) != null) ||
+    if ((getActionExpression(bean) != null) ||
         !Boolean.TRUE.equals(
             arc.getAgent().getCapabilities().get(TrinidadAgent.CAP_MULTIPLE_WINDOWS)))
       return super.getLaunchOnclick(context, arc, component, bean);

Modified: incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputListOfValuesRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputListOfValuesRenderer.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputListOfValuesRenderer.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputListOfValuesRenderer.java Thu Dec 14 18:16:57 2006
@@ -60,7 +60,7 @@
     super.findTypeConstants(type);
     _searchDescKey = type.findKey("searchDesc");
     _iconKey = type.findKey("icon");
-    _actionKey = type.findKey("action");
+    _actionExpressionKey = type.findKey("actionExpression");
   }
 
   //
@@ -357,9 +357,9 @@
     return true;
   }
 
-  protected Object getAction(FacesBean bean)
+  protected Object getActionExpression(FacesBean bean)
   {
-    return bean.getProperty(_actionKey);
+    return bean.getProperty(_actionExpressionKey);
   }
 
   protected String getSearchDesc(
@@ -392,7 +392,7 @@
     return "af|inputListOfValues::content";
   }
 
-  private PropertyKey _actionKey;
+  private PropertyKey _actionExpressionKey;
   private PropertyKey _iconKey;
   private PropertyKey _searchDescKey;
 

Modified: incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyRenderer.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyRenderer.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyRenderer.java Thu Dec 14 18:16:57 2006
@@ -23,14 +23,14 @@
 import java.util.Arrays;
 import java.util.List;
 
+import javax.el.ValueExpression;
+
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.context.ResponseWriter;
 import javax.faces.convert.Converter;
 import javax.faces.convert.ConverterException;
 
-import javax.faces.el.ValueBinding;
-
 import javax.faces.model.SelectItem;
 
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
@@ -92,10 +92,10 @@
       converter = getDefaultConverter(context, bean);
 
     Class<?> modelClass = null;
-    ValueBinding binding = getValueBinding(bean);
-    if (binding != null)
+    ValueExpression expression = getValueExpression(bean);
+    if (expression != null)
     {
-      modelClass = binding.getType(context);
+      modelClass = expression.getType(context.getELContext());
     }
 
     boolean valuePassThru = getValuePassThru(getFacesBean(component));
@@ -144,11 +144,11 @@
     FacesContext context,
     FacesBean    bean)
   {
-    ValueBinding binding = getValueBinding(bean);
-    if (binding == null)
+    ValueExpression expression = getValueExpression(bean);
+    if (expression == null)
       return null;
 
-    Class<?> type = binding.getType(context);
+    Class<?> type = expression.getType(context.getELContext());
     if ((type == null) || type.isAssignableFrom(List.class))
       return null;
 

Modified: incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ValueRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ValueRenderer.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ValueRenderer.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ValueRenderer.java Thu Dec 14 18:16:57 2006
@@ -15,10 +15,11 @@
  */
 package org.apache.myfaces.trinidadinternal.renderkit.core.xhtml;
 
+import javax.el.ValueExpression;
+
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.convert.Converter;
-import javax.faces.el.ValueBinding;
 
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.bean.PropertyKey;
@@ -67,11 +68,11 @@
     FacesContext context,
     FacesBean    bean)
   {
-    ValueBinding binding = getValueBinding(bean);
-    if (binding == null)
+    ValueExpression expression = getValueExpression(bean);
+    if (expression == null)
       return null;
 
-    Class<?> type = binding.getType(context);
+    Class<?> type = expression.getType(context.getELContext());
     return ConverterUtils.createConverter(context, type);
   }
 
@@ -81,11 +82,11 @@
   }
 
   /**
-   * Returns the ValueBinding for the "value" property.
+   * Returns the ValueExpression for the "value" property.
    */
-  protected ValueBinding getValueBinding(FacesBean bean)
+  protected ValueExpression getValueExpression(FacesBean bean)
   {
-    return bean.getValueBinding(_valueKey);
+    return bean.getValueExpression(_valueKey);
   }
 
   protected Converter getConverter(FacesBean bean)

Modified: incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectOneRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectOneRenderer.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectOneRenderer.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectOneRenderer.java Thu Dec 14 18:16:57 2006
@@ -237,6 +237,13 @@
     }
 
     @Override
+    protected String getClientId(FacesContext context, UIComponent component)
+    {
+      // We use the table's container client ID
+      return component.getContainerClientId(context);
+    }
+
+    @Override
     protected Object getSubmittedValue(FacesBean bean)
     {
       TableRenderingContext tContext =

Modified: incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TreeNodeColumnRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TreeNodeColumnRenderer.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TreeNodeColumnRenderer.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TreeNodeColumnRenderer.java Thu Dec 14 18:16:57 2006
@@ -135,7 +135,7 @@
   {
     // we need to render a unique ID for the expand/collapse link, so that
     // PPR can restore the focus correctly after a PPR request:
-    String tableName = tContext.getTable().getClientId(fc);
+    String tableName = tContext.getTable().getContainerClientId(fc);
     String id = tableName + NamingContainer.SEPARATOR_CHAR + _ICON_ID; 
     fc.getResponseWriter().writeAttribute("id", id, null);
   }

Modified: incubator/adffaces/branches/faces-1_2-061214/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-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/htmlBasic/ComponentFacesBean.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/htmlBasic/ComponentFacesBean.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/htmlBasic/ComponentFacesBean.java Thu Dec 14 18:16:57 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-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/uix/SelectItemSupport.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/uix/SelectItemSupport.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/uix/SelectItemSupport.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/uix/SelectItemSupport.java Thu Dec 14 18:16:57 2006
@@ -22,13 +22,14 @@
 import java.util.List;
 import java.util.Map;
 
+import javax.el.ValueExpression;
+
 import javax.faces.component.UIComponent;
 import javax.faces.component.UISelectItem;
 import javax.faces.component.UISelectItems;
 import javax.faces.component.ValueHolder;
 import javax.faces.context.FacesContext;
 import javax.faces.convert.Converter;
-import javax.faces.el.ValueBinding;
 import javax.faces.model.SelectItem;
 import org.apache.myfaces.trinidad.component.UIXSelectItem;
 import org.apache.myfaces.trinidadinternal.convert.ConverterUtils;
@@ -370,13 +371,13 @@
     Converter converter = null;
     Class<?> modelClass = null;
     
-    ValueBinding binding = component.getValueBinding("value");
-    if (binding != null)
+    ValueExpression expression = component.getValueExpression("value");
+    if (expression != null)
     {
-      modelClass = binding.getType(fContext);
+      modelClass = expression.getType(fContext.getELContext());
       if (modelClass == null)
       {
-        Object o = binding.getValue(fContext);
+        Object o = expression.getValue(fContext.getELContext());
         if (o != null)
         {
           modelClass = o.getClass();

Modified: incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ComponentDefTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ComponentDefTag.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ComponentDefTag.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ComponentDefTag.java Thu Dec 14 18:16:57 2006
@@ -23,7 +23,7 @@
 
 import javax.servlet.jsp.JspException;
 import org.apache.myfaces.trinidadinternal.taglib.util.TagUtils;
-import javax.faces.webapp.UIComponentTag;
+import javax.faces.webapp.UIComponentClassicTagBase;
 
 public class ComponentDefTag extends TagSupport
 {
@@ -41,7 +41,7 @@
   @Override
   public int doStartTag() throws JspException
   {
-    UIComponentTag tag = UIComponentTag.getParentUIComponentTag(pageContext);
+    UIComponentClassicTagBase tag = UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);
     if (tag == null)
     {
       throw new JspException(
@@ -60,9 +60,6 @@
 
       if (_var != null)
       {
-        if (TagUtils.isValueReference(_var))
-          throw new JspException("tr:componentDef does not support EL on 'var'");
-          
         ((UIXComponentRef) component).setVar(_var);
       }
     }

Modified: incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ComponentRefTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ComponentRefTag.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ComponentRefTag.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ComponentRefTag.java Thu Dec 14 18:16:57 2006
@@ -209,7 +209,7 @@
       AttributeMetaData attr = attrs.get(i);
       String name = attr.getAttrName();
       Class<?> klass = attr.getAttrClass();
-      if (region.getValueBinding(name) != null)
+      if (region.getValueExpression(name) != null)
         continue;
 
       Object compValue = compAttrs.get(name);

Modified: incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/FacetRefTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/FacetRefTag.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/FacetRefTag.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/FacetRefTag.java Thu Dec 14 18:16:57 2006
@@ -17,7 +17,7 @@
 
 import javax.faces.component.UIComponent;
 import javax.faces.webapp.FacetTag;
-import javax.faces.webapp.UIComponentTag;
+import javax.faces.webapp.UIComponentClassicTagBase;
 
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.Tag;
@@ -46,7 +46,7 @@
   @Override
   public int doStartTag() throws JspException
   {
-    UIComponentTag tag = UIComponentTag.getParentUIComponentTag(pageContext);
+    UIComponentClassicTagBase tag = UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);
     if (tag == null)
     {
       _LOG.warning("facetRef must be inside of a UIComponent tag.");

Modified: incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ForEachTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ForEachTag.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ForEachTag.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ForEachTag.java Thu Dec 14 18:16:57 2006
@@ -15,19 +15,26 @@
  */
 package org.apache.myfaces.trinidadinternal.taglib;
 
+import java.io.Serializable;
+
 import java.lang.reflect.Array;
 
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import javax.el.ELContext;
+import javax.el.PropertyNotWritableException;
+import javax.el.ValueExpression;
+import javax.el.VariableMapper;
+
 import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
 import javax.faces.webapp.UIComponentTag;
 
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.JspTagException;
 import javax.servlet.jsp.tagext.TagSupport;
+import javax.servlet.jsp.jstl.core.IndexedValueExpression;
 
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 import org.apache.myfaces.trinidad.webapp.ELContextTag;
@@ -56,45 +63,38 @@
  *
  * @author The Oracle ADF Faces Team
  */
-public class ForEachTag extends TagSupport implements ELContextTag
+public class ForEachTag extends TagSupport
 {
-  public void setItems(String items)
+  public void setItems(ValueExpression items)
   {
-    if (!items.startsWith("#{") ||
-        !items.endsWith("}"))
+    if (items.isLiteralText())
       throw new IllegalArgumentException(
-        "\"items\" must be a simple JSF EL expression");
+        "\"items\" must be an EL expression");
     _items = items;
   }
 
-  public void setBegin(String begin)
+  public void setBegin(Integer begin)
   {
     _begin = begin;
   }
 
-  public void setEnd(String end)
+  public void setEnd(Integer end)
   {
     _end = end;
   }
 
-  public void setStep(String step)
+  public void setStep(Integer step)
   {
     _step = step;
   }
 
   public void setVar(String var)
   {
-    if (UIComponentTag.isValueReference(var))
-      throw new IllegalArgumentException("\"var\" cannot be an expression");
-
     _var = var;
   }
 
   public void setVarStatus(String varStatus)
   {
-    if (UIComponentTag.isValueReference(varStatus))
-      throw new IllegalArgumentException("\"varStatus\" cannot be an expression");
-
     _varStatus = varStatus;
   }
 
@@ -104,13 +104,13 @@
     _validateAttributes();
 
     FacesContext context = FacesContext.getCurrentInstance();
-    _parentELContext = (ELContextTag)
-       findAncestorWithClass(this, ELContextTag.class);
-    _currentBegin = _resolveInteger(context, _begin, 0);
+    _currentBegin = (_begin == null) ? 0 : _begin.intValue();
     int length;
+
     if (null != _items)
     {
-      Object items = _resolveObject(context, _items);
+      Object items = _items.getValue(pageContext.getELContext());
+
       //pu: If items is specified and resolves to null, it is treated as an
       //  empty collection, i.e., no iteration is performed.
       if (items == null)
@@ -119,6 +119,8 @@
           _LOG.fine("Items expression " + _items + " resolved to null.");
         return SKIP_BODY;
       }
+
+      _itemsValue = items;
       // =-=AEW <c:forEach> supports arbitrary collections;  but
       // JSF only supports List in its EL.
       if (items instanceof List)
@@ -141,7 +143,8 @@
           _LOG.fine("Size of 'items' is less than 'begin'");
         return SKIP_BODY;
       }
-      _currentEnd = _resolveInteger(context, _end, length - 1);
+
+      _currentEnd = (_end == null) ? length - 1 : _end.intValue();
       //pu: If 'end' were specified, but is beyond the size of collection, limit
       //  the iteration to where the collection ends. A mimic of c:forEach and
       //  fix for bug 4029853.
@@ -150,41 +153,35 @@
     }
     else
     {
-      _currentEnd = _resolveInteger(context, _end, 0);
+      _currentEnd = (_end == null) ? 0 : _end.intValue();
     }
     _currentIndex = _currentBegin;
-    _currentStep = _resolveInteger(context, _step, 1);
+    _currentStep = (_step == null) ? 1 : _step.intValue();
     //pu: Now check the valid relation between 'begin','end' and validity of 'step'
     _validateRangeAndStep();
+    // If we can bail, do it now
     if (_currentEnd < _currentIndex)
       return SKIP_BODY;
 
-    if (null != _var || null != _varStatus)
-    {
-      //pu: If items not defined (syntax 2), the return type of 'var' is an
-      //  int according to JSTL specs, and apache impl returns index. Mimic.
-      _varReplacement = (null == _items)?
-        String.valueOf(_currentIndex):
-        _items.substring(2, _items.length() - 1) + "[" + _currentIndex + "]";
-    }
-    //pu: If there is no varStatus set, no point in keeping loop status
-    //  variables updated.
+    // Save off the previous deferred variables
+    VariableMapper vm = 
+      pageContext.getELContext().getVariableMapper();
+    if (_var != null)
+      _previousDeferredVar = vm.resolveVariable(_var);
+
     if (null != _varStatus)
     {
-      _updateLoopStatus();
+      _previousDeferredVarStatus = vm.resolveVariable(_varStatus);
       _propertyReplacementMap = new HashMap<String, Object>(9, 1);
-      _propertyReplacementMap.put("begin", new Integer(_currentBegin));
-      _propertyReplacementMap.put("end", new Integer(_currentEnd));
-      _propertyReplacementMap.put("step", new Integer(_currentStep));
-      _propertyReplacementMap.put("count", new Integer(_currentCount));
-      _propertyReplacementMap.put("index", new Integer(_currentIndex));
-      _propertyReplacementMap.put("current", _varReplacement);
-      _propertyReplacementMap.put(
-        "first",
-        (_isFirst)? Boolean.TRUE:Boolean.FALSE);
-      _propertyReplacementMap.put(
-        "last",
-        (_isLast)? Boolean.TRUE:Boolean.FALSE);
+      _propertyReplacementMap.put("begin", _currentBegin);
+      _propertyReplacementMap.put("end", _currentEnd);
+      _propertyReplacementMap.put("step", _currentStep);
+      _propertyReplacementMap.put("count", _currentCount);
+      _propertyReplacementMap.put("index", _currentIndex);
+      // FIXME: Can we support "current" efficiently?
+      //      _propertyReplacementMap.put("current", _varReplacement);
+      _propertyReplacementMap.put("first", _isFirst);
+      _propertyReplacementMap.put("last", _isLast);
     }
 
     if (_LOG.isFiner())
@@ -192,6 +189,10 @@
       _LOG.finer("Iterating from " + _currentIndex + " to " + _currentEnd +
                  " by " + _currentStep);
     }
+
+    // Update the variables
+    _updateVars();
+
     return EVAL_BODY_INCLUDE;
   }
 
@@ -200,102 +201,46 @@
   {
     _currentIndex += _currentStep;
 
-    if (null != _var || null != _varStatus)
-    {
-      //pu: If items not defined (syntax 2), the return type of 'var' is an
-      //  int according to JSTL specs, and apache impl returns index. Mimic.
-      _varReplacement = (null == _items)?
-        String.valueOf(_currentIndex):
-        _items.substring(2, _items.length() - 1) + "[" + _currentIndex + "]";
-    }
-
     //pu: if there is no varStatus set, no point in keeping loop status
     //  variables updated.
     if (null != _varStatus)
     {
       //pu: _isFirst is not yet updated after first iteration
       boolean isSecondIteration = (_isFirst)? true:false;
-      _updateLoopStatus();
       if (isSecondIteration)
       {
-        _propertyReplacementMap.put(
-          "first",
-          (_isFirst)? Boolean.TRUE:Boolean.FALSE);
+        _propertyReplacementMap.put("first", _isFirst);
       }
       if (_isLast)
       {
-        _propertyReplacementMap.put(
-          "last",
-          (_isLast)? Boolean.TRUE:Boolean.FALSE);
+        _propertyReplacementMap.put("last", _isLast);
       }
-      _propertyReplacementMap.put("count", new Integer(_currentCount));
-      _propertyReplacementMap.put("index", new Integer(_currentIndex));
-      _propertyReplacementMap.put("current", _varReplacement);
+      _propertyReplacementMap.put("count", _currentCount);
+      _propertyReplacementMap.put("index", _currentIndex);
+      // FIXME Can we support "current" efficiently?
+      //      _propertyReplacementMap.put("current", _varReplacement);
     }
 
+    // If we're at the end, bail
     if (_currentEnd < _currentIndex)
-      return SKIP_BODY;
-    return EVAL_BODY_AGAIN;
-  }
-
-  public String transformId(String id)
-  {
-    if (_parentELContext != null)
-      id = _parentELContext.transformId(id);
-
-    // SEPARATOR_CHAR would be nice;  but JSF does not allow
-    // the separator char in an ID - just in client IDs.
-    //    return id + NamingContainer.SEPARATOR_CHAR + _currentIndex;
-    return id + '_' + _currentIndex;
-  }
-  static String __transformExpression(
-    String expression,
-    String var,
-    String subst)
-  {
-    String varDot = var + ".";
-    Tokenizer tokens = new Tokenizer(expression);
-    StringBuffer buf = new StringBuffer(expression.length());
-    while(tokens.hasNext())
-    {
-      Token tok = tokens.next();
-      String exp = tok.getText();
-      if (tok.type == Tokenizer.VAR_TYPE)
-      {
-        if (var.equals(exp) || exp.startsWith(varDot))
-        {
-          buf.append(subst);
-          buf.append(exp.substring(var.length()));
-          continue;
-        }
-      }
-
-      buf.append(exp);
-    }
-    return buf.toString();
-  }
-  public String transformExpression(String expression)
-  {
-    if (expression != null)
     {
-      String transformedExp = expression;
-      int expressionStart = expression.indexOf("#{");
-      if (expressionStart >= 0)
-      {
-        transformedExp = _transformExpression(expression);
+      // Restore EL state
+      VariableMapper vm = 
+        pageContext.getELContext().getVariableMapper();
+      if (_var != null)
+        vm.setVariable(_var, _previousDeferredVar);
+      if (_varStatus != null)
+        vm.setVariable(_varStatus, _previousDeferredVarStatus);
 
-        if (_parentELContext != null)
-          transformedExp = _parentELContext.transformExpression(transformedExp);
-      }
-
-      if (_LOG.isFiner())
-        _LOG.finer("Transformed expression:{0} to:{1}",
-                   new String[] {expression, transformedExp});
-      return transformedExp;
+      return SKIP_BODY;
     }
+    
+    // Otherwise, update the variables and go again
+    _updateVars();
 
-    return null;
+    return EVAL_BODY_AGAIN;
   }
+
   /**
    * Release state.
    */
@@ -303,25 +248,46 @@
   public void release()
   {
     super.release();
-    //=-=pu: Does only the properties that has setters need to be released ?
-    //  What about variables like _propertyReplacementMap/_varReplacement etc. ?
     _begin = null;
     _end = null;
-    _end = null;
-    _items = null;
     _step = null;
+    _items = null;
+    _itemsValue = null;
     _var = null;
     _varStatus = null;
-  }
-
-  protected ValueBinding createValueBinding(
-    FacesContext context,
-    String       expression)
-  {
-    if (_parentELContext != null)
-      expression = _parentELContext.transformExpression(expression);
+    _propertyReplacementMap = null;
+    _previousDeferredVar = null;
+    _previousDeferredVarStatus = null;
+  }
+
+  // Push new values into the VariableMapper and the pageContext
+  private void _updateVars()
+  {
+    VariableMapper vm = 
+      pageContext.getELContext().getVariableMapper();
+    if (_var != null)
+    {
+      ValueExpression iterated = new IndexedValueExpression(_items,
+                                                            _currentIndex);
+      vm.setVariable(_var, iterated);
+      
+      Object items = _itemsValue;
+      Object item;
+      if (items instanceof List)
+        item = ((List) items).get(_currentIndex);
+      else
+        item = Array.get(items, _currentIndex);
 
-    return context.getApplication().createValueBinding(expression);
+      pageContext.setAttribute(_var, item);
+    }
+    
+    if (_varStatus != null)
+    {
+      pageContext.setAttribute(_varStatus, _propertyReplacementMap);
+      ValueExpression constant = new Constants(
+                                      new HashMap(_propertyReplacementMap));
+      vm.setVariable(_varStatus, constant);
+    }
   }
 
   private void _validateAttributes() throws JspTagException
@@ -349,154 +315,62 @@
     if (_currentStep < 1)
       throw new JspTagException("'step' < 1");
   }
-  
-  private String _transformExpression(String expression)
+
+  // Basic ValueExpression that always returns a constant object
+  static private class Constants extends ValueExpression
+                                 implements Serializable
   {
-    boolean doVar = (_var != null);
-    boolean doVarStatus = (_varStatus != null);
-    if (!(doVar || doVarStatus))
-      return expression;
-    StringBuffer buf = new StringBuffer(expression.length());
-    // ACW: see bug 3754666:
-    Tokenizer tokens = new Tokenizer(expression);
-    String varDot = _var+".";
-    String varStatusDot = _varStatus+".";
-    while(tokens.hasNext())
-    {
-      Token tok = tokens.next();
-      String text = tok.getText();
-      if (tok.type == Tokenizer.VAR_TYPE)
-      {
-        if (doVar && (_var.equals(text) || text.startsWith(varDot)))
-        {
-          text = _replaceVariableAndPropertiesInExpression(
-            text, _var, _varReplacement, null);
-        }
-        else if (doVarStatus && (_varStatus.equals(text) || text.startsWith(varStatusDot)))
-        {
-          text = _replaceVariableAndPropertiesInExpression(
-            text, _varStatus, null, _propertyReplacementMap);
-        }
-      }
-      buf.append(text);
+    public Constants(Object o)
+    {
+      _o = o;
     }
-    return buf.toString();
-  }
-  /**
-   * Replaces all occurance of 'variable' and the property (the key in map)
-   * with the property replacement (value in the map).
-   * If propertyReplacementMap were to be null, then all the occurance of
-   * 'variable' will be replaced by 'variableReplacement'.
-   * Returns a string modified thus.
-   */
-  private String _replaceVariableAndPropertiesInExpression(
-    String subExpression,
-    String variable,
-    String variableReplacement,
-    Map<String, Object> propertyReplacementMap)
-  {
-    int variableLength = variable.length();
-    //pu: Now check whether the variable is followed by any property from
-    //  the supplied map.
-    if (null != propertyReplacementMap)
-    {
-      String property;
-      String propertyReplacement;
-      for(Map.Entry<String, Object> entry : propertyReplacementMap.entrySet())
-      {
-        property = entry.getKey();
-        String expressionAfterVar = subExpression.substring(variableLength);
-        if (expressionAfterVar.startsWith("."+property))
-        {
-          int propertyLength = property.length();
-          //pu: We found our property, but it could be followed
-          //  by an alphanumeric in which case we ignore and move on because
-          //  we just found it as a substring
-          int endOfReplacement = propertyLength + 1;
-          if (expressionAfterVar.length() > endOfReplacement)
-          {
-            if (Character.isLetterOrDigit(
-              expressionAfterVar.charAt(endOfReplacement)))
-            {
-              continue;
-            }
-          }
-          propertyReplacement = entry.getValue().toString();
-          //pu: Replace both the variable plus the property following it.
-          subExpression = _replaceSubString(
-            subExpression,
-            0,
-            variableLength + propertyLength + 1,
-            propertyReplacement);
-          //pu: If we handled atleast one property, break out from here.
-          break;
-        }
-      }
+
+    public Object getValue(ELContext context)
+    {
+      return _o;
     }
-    //pu: If there were no properties to be replaced, replace the variable itself
-    else
+
+    public void setValue(ELContext context, Object value)
     {
-      subExpression = _replaceSubString(subExpression, 0, variableLength, variableReplacement);
+      throw new PropertyNotWritableException();
     }
 
+    public boolean isReadOnly(ELContext context)
+    {
+      return true;
+    }
 
-    return subExpression;
-  }
-  /**
-   * Given the 'str', replaces a substring starting from 'beginIndex'
-   * of 'noOfChars' length with the string in 'replacement', returns the
-   * string modified thus.
-   */
-  private String _replaceSubString(
-    String str,
-    int beginIndex,
-    int noOfChars,
-    String replacement)
-  {
-    StringBuffer buffer = new StringBuffer(str.length() +
-                                           replacement.length() -
-                                           noOfChars);
-    buffer.append(str.substring(0, beginIndex));
-    buffer.append(replacement);
-    buffer.append(str.substring(beginIndex + noOfChars));
-    return buffer.toString();
-  }
-  /**
-   * Update the loop status variables.
-   */
-  private void _updateLoopStatus()
-  {
-    _currentCount = ((_currentIndex - _currentBegin)/_currentStep) + 1;
-    _isFirst = (_currentIndex == _currentBegin);
-    _isLast = (_currentIndex + _currentStep) > _currentEnd;
-  }
+    public Class getType(ELContext context)
+    {
+      return _o.getClass();
+    }
 
+    public Class getExpectedType()
+    {
+      return _o.getClass();
+    }
 
-  private Object _resolveObject(FacesContext context, String expression)
-  {
-    ValueBinding vb = createValueBinding(context, expression);
-    return vb.getValue(context);
-  }
+    public String getExpressionString()
+    {
+      return null;
+    }
 
-  private int _resolveInteger(
-    FacesContext context,
-    String       expression,
-    int          defaultValue)
-  {
-    if (expression == null)
-      return defaultValue;
+    public boolean equals(Object obj)
+    {
+      return obj == this;
+    }
 
-    if (UIComponentTag.isValueReference(expression))
+    public int hashCode()
     {
-      Object o = _resolveObject(context, expression);
-      if (o instanceof Number)
-        return ((Number) o).intValue();
-      if (o == null)
-        return defaultValue;
+      return _o.hashCode();
+    }
 
-      expression = o.toString();
+    public boolean isLiteralText()
+    {
+      return true;
     }
-    return Integer.parseInt(expression);
+
+    private Object _o;
   }
 
   private int _currentBegin;
@@ -506,18 +380,23 @@
   private int _currentCount;
   private boolean _isFirst;
   private boolean _isLast;
-  private ELContextTag _parentELContext;
 
-  private String _items;
-  private String _begin;
-  private String _end;
-  private String _step;
+
+  private ValueExpression _items;
+  private Object          _itemsValue;
+
+  private Integer _begin;
+  private Integer _end;
+  private Integer _step;
   private String _var;
   private String _varStatus;
-  //pu: Map for properties referred off from 'varStatus' and their replacements
+  
+  // Saved values on the VariableMapper
+  private ValueExpression _previousDeferredVar;
+  private ValueExpression _previousDeferredVarStatus;
+
+  // Map for properties referred off from 'varStatus' and their replacements
   private Map<String, Object> _propertyReplacementMap;
-  //pu: Represents replacement for 'var' upon every iteration
-  private String _varReplacement;
 
   private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(ForEachTag.class);
 

Modified: incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/convert/ConvertIntegerTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/convert/ConvertIntegerTag.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/convert/ConvertIntegerTag.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/convert/ConvertIntegerTag.java Thu Dec 14 18:16:57 2006
@@ -15,8 +15,10 @@
  */
 package org.apache.myfaces.trinidadinternal.taglib.convert;
 
+import javax.faces.application.Application;
 import javax.faces.convert.Converter;
-import javax.faces.webapp.ConverterTag;
+import javax.faces.context.FacesContext;
+import javax.faces.webapp.ConverterELTag;
 
 import javax.servlet.jsp.JspException;
 import org.apache.myfaces.trinidadinternal.convert.IntegerConverter;
@@ -25,28 +27,22 @@
 
  * @version 2.0 (1.0) 2000/03/16 23:23:33
  */
-public class ConvertIntegerTag extends ConverterTag
+public class ConvertIntegerTag extends ConverterELTag
 {
 
   public ConvertIntegerTag()
   {
   }
 
-  @Override
-  public int doStartTag() throws JspException
-  {
-    super.setConverterId(IntegerConverter.CONVERTER_ID);
-    return super.doStartTag();
-  }
-
   /**
    * 
    */
   @Override
   protected Converter createConverter() throws JspException
   {
-    IntegerConverter converter =
-                              (IntegerConverter)super.createConverter();
+    Application application = FacesContext.getCurrentInstance().getApplication();
+    IntegerConverter converter = (IntegerConverter)
+      application.createConverter(IntegerConverter.CONVERTER_ID);
     return converter;
   }
 }

Modified: incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ResetActionListenerTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ResetActionListenerTag.java?view=diff&rev=487429&r1=487428&r2=487429
==============================================================================
--- incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ResetActionListenerTag.java (original)
+++ incubator/adffaces/branches/faces-1_2-061214/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ResetActionListenerTag.java Thu Dec 14 18:16:57 2006
@@ -17,7 +17,7 @@
 
 import javax.faces.component.ActionSource;
 import javax.faces.component.UIComponent;
-import javax.faces.webapp.UIComponentTag;
+import javax.faces.webapp.UIComponentClassicTagBase;
 
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.TagSupport;
@@ -32,7 +32,7 @@
   @Override
   public int doStartTag() throws JspException
   {
-    UIComponentTag tag = UIComponentTag.getParentUIComponentTag(pageContext);
+    UIComponentClassicTagBase tag = UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);
     if (tag == null)
     {
       throw new JspException(