incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r502428 [7/44] - in /incubator/adffaces/branches/faces-1_2-070201: ./ plugins/ 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/...
Date Fri, 02 Feb 2007 01:01:25 GMT
Modified: incubator/adffaces/branches/faces-1_2-070201/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-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/uix/SelectItemSupport.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/uix/SelectItemSupport.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/uix/SelectItemSupport.java Thu Feb  1 17:00:47 2007
@@ -25,13 +25,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;
@@ -373,13 +374,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-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/expl/Coercions.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/expl/Coercions.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/expl/Coercions.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/expl/Coercions.java Thu Feb  1 17:00:47 2007
@@ -179,6 +179,11 @@
       {
         return text;
       }
+      else if (Enum.class.isAssignableFrom(type))
+      {
+        return Enum.valueOf((Class<? extends Enum>) type, text);
+      }
+
       throw new IllegalArgumentException(text + " cannot be parsed into a " +
                                          type.getName());
     }
@@ -269,6 +274,10 @@
           Array.set(res, 0, arrayValue);
         }
         return res;
+      }
+      else if (Enum.class.isAssignableFrom(type))
+      {
+        return Enum.valueOf((Class<? extends Enum>) type, value.toString());
       }
 
       throw new IllegalArgumentException("Could not coerce value of type " +

Modified: incubator/adffaces/branches/faces-1_2-070201/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-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ComponentDefTag.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ComponentDefTag.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ComponentDefTag.java Thu Feb  1 17:00:47 2007
@@ -26,7 +26,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
 {
@@ -44,7 +44,7 @@
   @Override
   public int doStartTag() throws JspException
   {
-    UIComponentTag tag = UIComponentTag.getParentUIComponentTag(pageContext);
+    UIComponentClassicTagBase tag = UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);
     if (tag == null)
     {
       throw new JspException(
@@ -63,9 +63,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-070201/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-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ComponentRefTag.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ComponentRefTag.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ComponentRefTag.java Thu Feb  1 17:00:47 2007
@@ -211,7 +211,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-070201/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-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/FacetRefTag.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/FacetRefTag.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/FacetRefTag.java Thu Feb  1 17:00:47 2007
@@ -20,7 +20,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;
@@ -49,7 +49,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-070201/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-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ForEachTag.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ForEachTag.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ForEachTag.java Thu Feb  1 17:00:47 2007
@@ -18,24 +18,27 @@
  */
 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;
-import org.apache.myfaces.trinidadinternal.el.Tokenizer;
-import org.apache.myfaces.trinidadinternal.el.Tokenizer.Token;
 
 //JSTL Core Library - <c:forEach> Tag
 //===================================
@@ -59,45 +62,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;
   }
 
@@ -107,13 +103,20 @@
     _validateAttributes();
 
     FacesContext context = FacesContext.getCurrentInstance();
-    _parentELContext = (ELContextTag)
-       findAncestorWithClass(this, ELContextTag.class);
-    _currentBegin = _resolveInteger(context, _begin, 0);
+    _currentBegin = (_begin == null) ? 0 : _begin.intValue();
+    _isFirst = true;
     int length;
+
     if (null != _items)
     {
-      Object items = _resolveObject(context, _items);
+      // AdamWiner: for reasons I cannot yet explain, using the JSP's
+      // ELContext is giving me big problems trying to grab Lists
+      // from inside of managed beans.  Switching this one call
+      // to the JSF ELContext seems to resolve that.  We certainly
+      // have to use the JSPs ELResolver for calling through
+      // to the VariableMapper
+      Object items = _items.getValue(context.getELContext());//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)
@@ -122,6 +125,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)
@@ -144,7 +149,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.
@@ -153,41 +159,39 @@
     }
     else
     {
-      _currentEnd = _resolveInteger(context, _end, 0);
+      _currentEnd = (_end == null) ? 0 : _end.intValue();
     }
     _currentIndex = _currentBegin;
-    _currentStep = _resolveInteger(context, _step, 1);
+    _currentCount = 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.
+    _isLast = _currentIndex == _currentEnd;
+
+    // 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())
@@ -195,6 +199,10 @@
       _LOG.finer("Iterating from " + _currentIndex + " to " + _currentEnd +
                  " by " + _currentStep);
     }
+
+    // Update the variables
+    _updateVars();
+
     return EVAL_BODY_INCLUDE;
   }
 
@@ -202,103 +210,49 @@
   public int doAfterBody()
   {
     _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 + "]";
-    }
+    _currentCount += 1;
 
     //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)
+      if (_isFirst)
       {
-        _propertyReplacementMap.put(
-          "first",
-          (_isFirst)? Boolean.TRUE:Boolean.FALSE);
+        _propertyReplacementMap.put("first", Boolean.FALSE);
+        _isFirst = false;
       }
+
+      _isLast = (_currentIndex == _currentEnd);
       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);
-
-        if (_parentELContext != null)
-          transformedExp = _parentELContext.transformExpression(transformedExp);
-      }
+      // Restore EL state
+      VariableMapper vm = 
+        pageContext.getELContext().getVariableMapper();
+      if (_var != null)
+        vm.setVariable(_var, _previousDeferredVar);
+      if (_varStatus != null)
+        vm.setVariable(_varStatus, _previousDeferredVarStatus);
 
-      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.
    */
@@ -306,25 +260,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
@@ -352,154 +327,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;
@@ -509,18 +392,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-070201/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-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/convert/ConvertIntegerTag.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/convert/ConvertIntegerTag.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/convert/ConvertIntegerTag.java Thu Feb  1 17:00:47 2007
@@ -18,8 +18,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;
@@ -28,28 +30,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-070201/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-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ResetActionListenerTag.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ResetActionListenerTag.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ResetActionListenerTag.java Thu Feb  1 17:00:47 2007
@@ -20,7 +20,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;
@@ -34,7 +34,7 @@
   @Override
   public int doStartTag() throws JspException
   {
-    UIComponentTag tag = UIComponentTag.getParentUIComponentTag(pageContext);
+    UIComponentClassicTagBase tag = UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);
     if (tag == null)
     {
       throw new JspException(

Modified: incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ReturnActionListener.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ReturnActionListener.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ReturnActionListener.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ReturnActionListener.java Thu Feb  1 17:00:47 2007
@@ -18,6 +18,8 @@
  */
 package org.apache.myfaces.trinidadinternal.taglib.listener;
 
+import javax.el.ValueExpression;
+
 import javax.faces.component.StateHolder;
 import javax.faces.event.ActionEvent;
 import javax.faces.event.ActionListener;
@@ -48,19 +50,17 @@
 
   public void processAction(ActionEvent event)
   {
-    Object value = getValue();
+    Object value = getProperty(VALUE_KEY);
     RequestContext adf = RequestContext.getCurrentInstance();
     adf.returnFromDialog(value, null);
   }
 
-  public Object getValue()
-  {
-    return getProperty(VALUE_KEY);
-  }
-
-  public void setValue(Object value)
+  public void setValue(ValueExpression value)
   {
-    setProperty(VALUE_KEY, value);
+    if (value.isLiteralText())
+      setProperty(VALUE_KEY, value.getValue(null));
+    else
+      setValueExpression(VALUE_KEY, value);
   }
 
   @Override

Modified: incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ReturnActionListenerTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ReturnActionListenerTag.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ReturnActionListenerTag.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ReturnActionListenerTag.java Thu Feb  1 17:00:47 2007
@@ -20,6 +20,8 @@
 
 import org.apache.myfaces.trinidadinternal.taglib.util.TagUtils;
 
+import javax.el.ValueExpression;
+
 import javax.servlet.jsp.tagext.TagSupport;
 import javax.servlet.jsp.JspException;
 
@@ -27,7 +29,7 @@
 import javax.faces.component.ActionSource;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
-import javax.faces.webapp.UIComponentTag;
+import javax.faces.webapp.UIComponentClassicTagBase;
 
 import org.apache.myfaces.trinidad.webapp.ELContextTag;
 
@@ -38,7 +40,7 @@
  */
 public class ReturnActionListenerTag extends TagSupport
 {
-  public void setValue(String value)
+  public void setValue(ValueExpression value)
   {
     _value = value;
   }
@@ -46,7 +48,8 @@
   @Override
   public int doStartTag() throws JspException
   {
-    UIComponentTag tag = UIComponentTag.getParentUIComponentTag(pageContext);
+    UIComponentClassicTagBase tag =
+      UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);
     if (tag == null)
     {
       throw new JspException(
@@ -72,21 +75,8 @@
 
     ReturnActionListener listener = new ReturnActionListener();
     if (_value != null)
-    {
-      String value = _value;
-      if (TagUtils.isValueReference(value))
-      {
-        if (parentELContext != null)
-          value = parentELContext.transformExpression(value);
-
-        listener.setValueBinding(ReturnActionListener.VALUE_KEY,
-                                 application.createValueBinding(value));
-      }
-      else
-      {
-        listener.setValue(value);
-      }
-    }
+      listener.setValue(_value);
+
     ((ActionSource) component).addActionListener(listener);
 
     return super.doStartTag();
@@ -99,5 +89,5 @@
     _value = null;
   }
 
-  private String _value;
+  private ValueExpression _value;
 }

Modified: incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/SetActionListener.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/SetActionListener.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/SetActionListener.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/SetActionListener.java Thu Feb  1 17:00:47 2007
@@ -18,9 +18,10 @@
  */
 package org.apache.myfaces.trinidadinternal.taglib.listener;
 
+import javax.el.ValueExpression;
+
 import javax.faces.component.StateHolder;
 import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
 import javax.faces.event.ActionEvent;
 import javax.faces.event.ActionListener;
 
@@ -46,7 +47,7 @@
   static public final FacesBean.Type TYPE = new FacesBean.Type();
   static public final PropertyKey FROM_KEY =
     TYPE.registerKey("from");
-  // Must be a ValueBinding
+  // Must be a ValueExpression
   static public final PropertyKey TO_KEY =
     TYPE.registerKey("to");
 
@@ -61,23 +62,23 @@
 
   public void processAction(ActionEvent event)
   {
-    ValueBinding to = getValueBinding(TO_KEY);
+    ValueExpression to = getValueExpression(TO_KEY);
     if (to != null)
     {
-      Object from = getFrom();
+      Object from = getProperty(FROM_KEY);
       try
       {
-        to.setValue(FacesContext.getCurrentInstance(), from);
+        to.setValue(FacesContext.getCurrentInstance().getELContext(), from);
       }
       catch (RuntimeException e)
       {
         if (_LOG.isWarning())
         {
-          ValueBinding fromBinding = getValueBinding(FROM_KEY);
+          ValueExpression fromExpression = getValueExpression(FROM_KEY);
           String mes = "Error setting:'"+to.getExpressionString() +
             "' to value:"+from;
-          if (fromBinding != null)
-            mes += " from:'"+fromBinding.getExpressionString()+"'";
+          if (fromExpression != null)
+            mes += " from:'"+fromExpression.getExpressionString()+"'";
             
           _LOG.warning(mes, e);
         }
@@ -86,14 +87,20 @@
     }
   }
 
-  public Object getFrom()
+  public void setFrom(ValueExpression from)
   {
-    return getProperty(FROM_KEY);
+    if (from.isLiteralText())
+      setProperty(FROM_KEY, from.getValue(null));
+    else
+      setValueExpression(FROM_KEY, from);
   }
 
-  public void setFrom(Object from)
+  public void setTo(ValueExpression to)
   {
-    setProperty(FROM_KEY, from);
+    if (to.isLiteralText())
+      throw new IllegalArgumentException("setActionListener's 'to' must be an EL expression");
+    
+    setValueExpression(TO_KEY, to);
   }
 
   @Override

Modified: incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/SetActionListenerTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/SetActionListenerTag.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/SetActionListenerTag.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/SetActionListenerTag.java Thu Feb  1 17:00:47 2007
@@ -20,6 +20,8 @@
 
 import org.apache.myfaces.trinidadinternal.taglib.util.TagUtils;
 
+import javax.el.ValueExpression;
+
 import javax.servlet.jsp.tagext.TagSupport;
 import javax.servlet.jsp.JspException;
 
@@ -27,7 +29,7 @@
 import javax.faces.component.ActionSource;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
-import javax.faces.webapp.UIComponentTag;
+import javax.faces.webapp.UIComponentClassicTagBase;
 
 import org.apache.myfaces.trinidad.webapp.ELContextTag;
 
@@ -39,12 +41,12 @@
  */
 public class SetActionListenerTag extends TagSupport
 {
-  public void setFrom(String from)
+  public void setFrom(ValueExpression from)
   {
     _from = from;
   }
 
-  public void setTo(String to)
+  public void setTo(ValueExpression to)
   {
     _to = to;
   }
@@ -52,7 +54,7 @@
   @Override
   public int doStartTag() throws JspException
   {
-    UIComponentTag tag = UIComponentTag.getParentUIComponentTag(pageContext);
+   UIComponentClassicTagBase tag = UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);
     if (tag == null)
     {
       throw new JspException(
@@ -79,34 +81,13 @@
     SetActionListener listener = new SetActionListener();
     if (_from != null)
     {
-      if (TagUtils.isValueReference(_from))
-      {
-        String from = _from;
-        if (parentELContext != null)
-          from = parentELContext.transformExpression(from);
-
-        listener.setValueBinding(SetActionListener.FROM_KEY,
-                                 application.createValueBinding(from));
-      }
-      else
-      {
-        listener.setFrom(_from);
-      }
-
-      if (TagUtils.isValueReference(_to))
-      {
-        String to = _to;
-        if (parentELContext != null)
-          to = parentELContext.transformExpression(to);
-
-        listener.setValueBinding(SetActionListener.TO_KEY,
-                                 application.createValueBinding(to));
-      }
-      else
-      {
+      listener.setFrom(_from);
+      if (_to.isLiteralText())
         throw new JspException("setActionListener's 'to' attribute must " +
                                "be an EL expression.");
-      }
+
+      if (_to != null)
+        listener.setTo(_to);
     }
 
     ((ActionSource) component).addActionListener(listener);
@@ -122,6 +103,6 @@
     _to = null;
   }
 
-  private String _from;
-  private String _to;
+  private ValueExpression _from;
+  private ValueExpression _to;
 }

Modified: incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/util/TagUtils.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/util/TagUtils.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/util/TagUtils.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/util/TagUtils.java Thu Feb  1 17:00:47 2007
@@ -32,7 +32,6 @@
 
 import javax.faces.application.Application;
 import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
 
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
@@ -52,14 +51,6 @@
   {
   }
 
-  public static ValueBinding getValueBinding(String valueBindingExpression)
-  {
-    FacesContext context = FacesContext.getCurrentInstance();
-    Application app = context.getApplication();
-    ValueBinding vb = app.createValueBinding(valueBindingExpression);
-    return vb;
-  }
-
   public static void assertNotNull(Object object)
   {
     if (null == object)
@@ -74,9 +65,12 @@
    * @return
    */
   public static String getString(
-    String      value)
+    Object value)
   {
-    return value;
+    if (value == null)
+      return null;
+
+    return value.toString();
   }
 
   /**
@@ -85,9 +79,15 @@
    * @return
    */
   public static boolean getBoolean(
-    String      value)
+    Object  value)
   {
-    return Boolean.valueOf(value).booleanValue();
+    if (value == null)
+      return false;
+    
+    if (value instanceof Boolean)
+      return ((Boolean) value).booleanValue();
+
+    return Boolean.valueOf(value.toString()).booleanValue();
   }
 
   /**
@@ -96,9 +96,15 @@
    * @return
    */
   public static int getInteger(
-    String      value)
+    Object  value)
   {
-    return Integer.valueOf(value).intValue();
+    if (value == null)
+      return 0;
+
+    if (value instanceof Number)
+      return ((Number) value).intValue();
+
+    return Integer.valueOf(value.toString()).intValue();
 
   }
 
@@ -108,10 +114,12 @@
    * @return
    */
   public static long getLong(
-    String      value)
+    Object      value)
   {
-    return Long.valueOf(value).longValue();
+    if (value == null)
+      return 0;
 
+    return Long.valueOf(value.toString()).longValue();
   }
 
   /**
@@ -120,9 +128,12 @@
    * @return
    */
   public static double getDouble(
-    String      value)
+    Object      value)
   {
-    return Double.valueOf(value).doubleValue();
+    if (value == null)
+      return 0;
+
+    return Double.valueOf(value.toString()).doubleValue();
 
   }
 
@@ -132,10 +143,12 @@
    * @return
    */
   public static float getFloat(
-    String      value)
+    Object      value)
   {
-    return Float.valueOf(value).floatValue();
+    if (value == null)
+      return 0;
 
+    return Float.valueOf(value.toString()).floatValue();
   }
 
   /**
@@ -145,9 +158,12 @@
    * @return
    */
   public static String[] getStringArray(
-    String      value) throws ParseException
+    Object  value) throws ParseException
   {
-    return _getTokensArray(value);
+    if (value == null)
+      return null;
+
+    return _getTokensArray(value.toString());
   }
 
   /**
@@ -156,9 +172,15 @@
    * @return
    */
   public static Date getDate(
-    String      value)
+    Object   value)
   {
-     return _parseISODate(value);
+    if (value == null)
+      return null;
+
+    if (value instanceof Date)
+      return ((Date) value);
+
+    return _parseISODate(value.toString());
   }
 
   /**
@@ -167,9 +189,15 @@
    * @return
    */
   public static Locale getLocale(
-    String      value)
+    Object      value)
   {
-    return _getLocale(value);
+    if (value == null)
+      return null;
+
+    if (value instanceof Locale)
+      return ((Locale) value);
+
+    return _getLocale(value.toString());
   }
 
   /**
@@ -178,21 +206,15 @@
    * @return
    */
   public static TimeZone getTimeZone(
-    String value)
+    Object value)
   {
-     return TimeZone.getTimeZone(value);
-  }
+    if (value == null)
+      return null;
 
-  public static boolean isValueReference(String expression)
-  {
-    if (null != expression)
-    {
-      int start = expression.indexOf("#{");
-      if ((start >= 0) && (expression.indexOf('}', start + 1) >= 0))
-        return true;
-    }
+    if (value instanceof TimeZone)
+      return ((TimeZone) value);
 
-    return false;
+     return TimeZone.getTimeZone(value.toString());
   }
 
   /**
@@ -200,9 +222,13 @@
    *  java.util.List of java.awt.Color objects and returns it.
    * @throws ParseException In case of any parse errors upon such conversion.
    */
-  public static List<Color> getColorList(String value) throws ParseException
+  public static List<Color> getColorList(Object value) throws ParseException
   {
-    String[] tokenArray = _getTokensArray(value);
+    if (value == null)
+      return null;
+
+    String valueStr = value.toString();
+    String[] tokenArray = _getTokensArray(valueStr);
     if (tokenArray == null)
       return null;
 
@@ -216,7 +242,7 @@
       if (!colorCode.startsWith("#"))
         throw new ParseException(
           "Color code " + colorCode + " in '" + value + "' does not start with a '#'",
-          value.indexOf(colorCode));
+          valueStr.indexOf(colorCode));
 
       //pu: Allow NumberFormatException (RTE) to propogate as is, or transform to JspException ?.
       int rgb = Integer.parseInt(colorCode.substring(1), 16);

Modified: incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/util/VirtualAttributeUtils.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/util/VirtualAttributeUtils.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/util/VirtualAttributeUtils.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/util/VirtualAttributeUtils.java Thu Feb  1 17:00:47 2007
@@ -18,7 +18,7 @@
  */
 package org.apache.myfaces.trinidadinternal.taglib.util;
 
-import javax.faces.el.ValueBinding;
+import javax.el.ValueExpression;
 
 import org.apache.myfaces.trinidad.bean.PropertyKey;
 import org.apache.myfaces.trinidad.bean.FacesBean;
@@ -56,14 +56,14 @@
 
   public static void setAccessKeyAttribute(
     FacesBean    bean,
-    ValueBinding valueBinding,
+    ValueExpression valueExpression,
     PropertyKey  textKey,
     PropertyKey  accessKeyKey)
   {
-    bean.setValueBinding(accessKeyKey,
-                         new AccessKeyBinding(valueBinding));
-    bean.setValueBinding(textKey,
-                         new StripAccessKeyBinding(valueBinding));
+    bean.setValueExpression(accessKeyKey,
+                            new AccessKeyBinding(valueExpression));
+    bean.setValueExpression(textKey,
+                         new StripAccessKeyBinding(valueExpression));
   }
 
   private VirtualAttributeUtils()

Modified: incubator/adffaces/branches/faces-1_2-070201/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-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/UINodeFacesBean.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/UINodeFacesBean.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/UINodeFacesBean.java Thu Feb  1 17:00:47 2007
@@ -21,7 +21,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;
@@ -170,14 +170,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);
         }
@@ -189,9 +189,9 @@
   }
 
   @Override
-  protected PropertyMap createBindingsMap()
+  protected PropertyMap createExpressionsMap()
   {
-    FlaggedPropertyMap bindings = new FlaggedPropertyMap()
+    FlaggedPropertyMap expressions = new FlaggedPropertyMap()
     {
       @Override
       public Object put(PropertyKey key, Object value)
@@ -207,12 +207,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));
             }
           }
 
@@ -239,8 +239,7 @@
       }
     };
 
-    bindings.setUseStateHolder(true);
-    return bindings;
+    return expressions;
   }
 
 

Modified: incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/bind/ConverterBoundValue.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/bind/ConverterBoundValue.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/bind/ConverterBoundValue.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/bind/ConverterBoundValue.java Thu Feb  1 17:00:47 2007
@@ -18,9 +18,10 @@
  */
 package org.apache.myfaces.trinidadinternal.uinode.bind;
 
+import javax.el.ValueExpression;
+
 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.component.UIXComponent;
@@ -55,15 +56,15 @@
     Converter converter = (Converter)
       bean.getProperty(UIXValue.CONVERTER_KEY);
 
-    // OK, no explicit converter, look at the ValueBinding
+    // OK, no explicit converter, look at the ValueExpression
     if (converter == null)
     {
-      ValueBinding binding = bean.getValueBinding(UIXValue.VALUE_KEY);
-      if (binding != null)
+      ValueExpression expression = bean.getValueExpression(UIXValue.VALUE_KEY);
+      if (expression != null)
       {
         FacesContext fContext = (context == null) ? 
           FacesContext.getCurrentInstance() : context.getFacesContext();
-        Class<?> type = binding.getType(fContext);
+        Class<?> type = expression.getType(fContext.getELContext());
         converter = ConverterUtils.createConverter(fContext, type);
       }
     }

Modified: incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/FacesConfigTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/FacesConfigTest.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/FacesConfigTest.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/FacesConfigTest.java Thu Feb  1 17:00:47 2007
@@ -29,6 +29,8 @@
   /* DISABLE THIS TEST: we cannot redistribute the web-facesconfig_1_1.dtd
      without a proper license.  Once in MyFaces Apache, we should be
      able to refer to the MyFaces copy of the DTD for this test */
+  /* But now in 1.2, we have to disable it again - because we need
+     to use Schema Validation. */
   public void testFacesConfigValidity() throws Throwable
   {
     /*

Modified: incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/FacesConfigParser.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/FacesConfigParser.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/FacesConfigParser.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/FacesConfigParser.java Thu Feb  1 17:00:47 2007
@@ -315,7 +315,7 @@
               
             try
             {
-              c = Class.forName(s);
+              c = _loadClass(s);
               if (isArray)
                 c = _getArrayType(c);
             }
@@ -354,6 +354,34 @@
     
     private FacesConfigInfo.ComponentInfo _info;
     private FacesConfigInfo.PropertyInfo  _property;
+  }
+
+  /**
+   * Load a class, "trying harder" - supports "." syntax
+   * to access inner classes
+   */
+  static private Class _loadClass(String s) throws ClassNotFoundException
+  {
+    try
+    {
+      return Class.forName(s);
+    }
+    catch (ClassNotFoundException cnfe)
+    {
+      // If the inner class works, great
+      int lastPeriod = s.lastIndexOf('.');
+      String ifInnerClass =
+        s.substring(0, lastPeriod) + "$" + s.substring(lastPeriod + 1);
+      try
+      {
+        return Class.forName(ifInnerClass);
+      }
+      catch (ClassNotFoundException cnfe2)
+      {
+        // Otherwise, throw the original exception
+        throw cnfe;
+      }
+    }
   }
 
   private class RendererParser extends BaseNodeParser

Modified: incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MApplication.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MApplication.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MApplication.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MApplication.java Thu Feb  1 17:00:47 2007
@@ -23,6 +23,12 @@
 import java.util.Iterator;
 import java.util.Locale;
 import java.util.Map;
+
+import javax.el.ExpressionFactory;
+import javax.el.ELContext;
+import javax.el.MethodExpression;
+import javax.el.ValueExpression;
+
 import javax.faces.FacesException;
 import javax.faces.application.Application;
 import javax.faces.application.NavigationHandler;
@@ -293,7 +299,7 @@
   }
 
   @Override
-  public Iterator<Class<?>> getConverterTypes()
+  public Iterator<Class> getConverterTypes()
   {
     throw new UnsupportedOperationException("Should not be called during rendering");
   }
@@ -344,6 +350,48 @@
     return new MValueBinding(expression);
   }
 
+ public Object evaluateExpressionGet(FacesContext context, String expression, Class expectedType) 
+  {
+      // TODO handle coercion
+    return createValueBinding(expression).getValue(context);
+  }
+
+  public ExpressionFactory getExpressionFactory()
+  {
+    return _exprFactory;
+  }
+
+  private ExpressionFactory _exprFactory = new ExpressionFactory()
+  {
+    public Object coerceToType(Object obj, Class<?> targetType)
+    {
+      return obj;
+    }
+
+    public MethodExpression createMethodExpression(
+      ELContext context,
+      String expression,
+      Class<?> expectedReturnType,
+      Class<?>[] expectedParamTypes) 
+    {
+      throw new UnsupportedOperationException("Not implemented yet");
+    }
+
+    public ValueExpression createValueExpression(
+       ELContext context, String expression, Class<?> expectedType)
+    {
+      // TODO handle coercion
+      ValueBinding vb = MApplication.this.createValueBinding(expression);
+      return new ValueBindingValueExpression(vb);
+    }
+    
+    
+    public ValueExpression createValueExpression(Object instance, Class<?> expectedType)
+    {
+      throw new UnsupportedOperationException("Not implemented yet");
+    }
+  };
+    
   private Map<String, String> _components = new HashMap<String, String>();
   private ViewHandler _viewHandler = new MViewHandler();
   private VariableResolver _variableResolver = new MVariableResolver();

Modified: incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MFacesContext.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MFacesContext.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MFacesContext.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MFacesContext.java Thu Feb  1 17:00:47 2007
@@ -41,6 +41,7 @@
 import javax.faces.render.RenderKit;
 
 import org.apache.myfaces.trinidadinternal.share.config.Configuration;
+import org.apache.myfaces.trinidadbuild.test.MockFacesContext12;
 import org.apache.shale.test.mock.MockExternalContext;
 import org.apache.shale.test.mock.MockFacesContext;
 
@@ -48,10 +49,11 @@
  * Mock faces context for use with unit tests
  * @author Arjuna Wijeyekoon
  */
-public class MFacesContext extends MockFacesContext
+public class MFacesContext extends MockFacesContext12
 {
-  public MFacesContext(boolean testMode)
+  public MFacesContext(Application application, boolean testMode)
   {
+    super(application);
     setCurrentInstance(this);
     _external = new External(testMode);
   }

Modified: incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MRequestContext.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MRequestContext.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MRequestContext.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MRequestContext.java Thu Feb  1 17:00:47 2007
@@ -22,6 +22,7 @@
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
+import java.util.Set;
 import java.util.TimeZone;
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIViewRoot;
@@ -228,6 +229,12 @@
   }
 
   @Override
+  public Set<UIComponent> getPartialTargets(UIComponent from)
+  {
+    throw new UnsupportedOperationException("Not implemented yet");
+  }
+
+  @Override
   public void addPartialTriggerListeners(UIComponent listener, String[] trigger)
   {
     throw new UnsupportedOperationException("Should not be called during rendering");
@@ -289,4 +296,4 @@
   static private TimeZone _FIXED_TIME_ZONE =
     TimeZone.getTimeZone("America/Los_Angeles");
   
-}
\ No newline at end of file
+}

Modified: incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MValueBinding.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MValueBinding.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MValueBinding.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MValueBinding.java Thu Feb  1 17:00:47 2007
@@ -44,6 +44,7 @@
     Object var =  vr.resolveVariable(context, varName);
     if (period < 0)
       return var;
+
     return _resolveProperty(context, var, _expression.substring(period + 1));
   }
 
@@ -58,7 +59,7 @@
 
     PropertyResolver pr = context.getApplication().getPropertyResolver();
     var =  pr.getValue(var, propertyName);
-    
+
     if (period < 0)
       return var;
     return _resolveProperty(context, var, expr.substring(period + 1));

Modified: incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/RenderKitPerfTestCase.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/RenderKitPerfTestCase.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/RenderKitPerfTestCase.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/RenderKitPerfTestCase.java Thu Feb  1 17:00:47 2007
@@ -125,7 +125,7 @@
     //    _fileWriter = new java.io.BufferedWriter(new java.io.FileWriter("c:\\tmp\\test.out", true));
 
     //    
-    _facesContext = new MFacesContext(false);
+    _facesContext = new MFacesContext(MApplication.sharedInstance(), false);
     ResponseWriter writer = new XhtmlResponseWriter(
       _fileWriter == null ? new NullWriter() : _fileWriter,
       XhtmlResponseWriter.XHTML_CONTENT_TYPE,

Modified: incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/RenderKitTestCase.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/RenderKitTestCase.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/RenderKitTestCase.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/RenderKitTestCase.java Thu Feb  1 17:00:47 2007
@@ -151,7 +151,7 @@
     @Override
     protected void setUp() throws IOException  
     {
-      _facesContext = new MFacesContext(true);
+      _facesContext = new MFacesContext(MApplication.sharedInstance(), true);
       _requestContext = new MRequestContext();
       _requestContext.setSkinFamily(_skin);
       _requestContext.setAgent(_agent);

Modified: incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/TestResponseWriter.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/TestResponseWriter.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/TestResponseWriter.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/TestResponseWriter.java Thu Feb  1 17:00:47 2007
@@ -581,6 +581,11 @@
   // spurious diffs
   private String _fixId(String valueStr)
   {
+    // All our golden files were produced with "_id" in JSF 1.1;
+    // and now in 1.2, that's "j_id".  Eliminate this diff.
+    if (valueStr.indexOf("j_id") >= 0)
+      valueStr = valueStr.replaceAll("j_id", "_id");
+
     if (valueStr.indexOf("_id") >= 0)
     {
       String re = "_id[0-9]+";

Modified: incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/taglib/TLDTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/taglib/TLDTest.java?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/taglib/TLDTest.java (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/taglib/TLDTest.java Thu Feb  1 17:00:47 2007
@@ -32,6 +32,7 @@
 
   public void testAdfFacesCoreValidity() throws Throwable
   {
+    /* TODO: use Schema validation
     URL dtdSource = getClass().getResource("/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd");
     String publicID = 
       "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN";
@@ -39,10 +40,12 @@
     executeValidityTest(dtdSource,
                         publicID,
                         tldSource);
+    */
   }
 
   public void testAdfFacesHtmlValidity() throws Throwable
   {
+    /* TODO: use Schema validation
     URL dtdSource = getClass().getResource("/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd");
     String publicID = 
       "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN";
@@ -50,5 +53,6 @@
     executeValidityTest(dtdSource,
                         publicID,
                         tldSource);
+    */
   }
 }

Modified: incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/page-facets-minimal-golden.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/page-facets-minimal-golden.xml?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/page-facets-minimal-golden.xml (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/page-facets-minimal-golden.xml Thu Feb  1 17:00:47 2007
@@ -161,21 +161,21 @@
                           >
                         
                         <option
-                             value="submitForm('formId',1,{source:'mainId:_idXXX:_idXXX'});"
+                             value="submitForm('formId',1,{source:'mainId:j_idXXX:j_idXXX'});"
                              id="uri-attr:mainId:_idXXX:_idXXX"
                              name="uri-attr:mainId:_idXXX:_idXXX"
                             >
                           choice1
                         </option>
                         <option
-                             value="submitForm('formId',1,{source:'mainId:_idXXX:_idXXX'});"
+                             value="submitForm('formId',1,{source:'mainId:j_idXXX:j_idXXX'});"
                              id="uri-attr:mainId:_idXXX:_idXXX"
                              name="uri-attr:mainId:_idXXX:_idXXX"
                             >
                           choice2
                         </option>
                         <option
-                             value="submitForm('formId',1,{source:'mainId:_idXXX:_idXXX'});"
+                             value="submitForm('formId',1,{source:'mainId:j_idXXX:j_idXXX'});"
                              id="uri-attr:mainId:_idXXX:_idXXX"
                              name="uri-attr:mainId:_idXXX:_idXXX"
                             >
@@ -189,7 +189,7 @@
                       </span>
                       <button
                            class="af_navigationPane_choice-button"
-                           onclick="var navLevelSelect = document.getElementById('mainId:_idXXX_af_choice_select'); eval(navLevelSelect.options[navLevelSelect.selectedIndex].value); return false;"
+                           onclick="var navLevelSelect = document.getElementById('mainId:j_idXXX_af_choice_select'); eval(navLevelSelect.options[navLevelSelect.selectedIndex].value); return false;"
                            type="button"
                           >
                         Go
@@ -600,22 +600,22 @@
                              class="AFFieldText"
                              id="mainId:_idXXX"
                              name="mainId:_idXXX"
-                             onchange="_commandChoice('formId','mainId:_idXXX');return false;"
+                             onchange="_commandChoice('formId','mainId:j_idXXX');return false;"
                             >
                           
                           <option
                                selected="selected"
-                               value="mainId:null:0:_idXXX[1]"
+                               value="mainId:j_idXXX:0:j_idXXX[1]"
                               >
                             First
                           </option>
                           <option
-                               value="mainId:null:1:_idXXX[1]"
+                               value="mainId:j_idXXX:1:j_idXXX[1]"
                               >
                             Second
                           </option>
                           <option
-                               value="mainId:null:2:_idXXX[1]"
+                               value="mainId:j_idXXX:2:j_idXXX[1]"
                               >
                             Third
                           </option>
@@ -639,7 +639,7 @@
                         <button
                              accesskey="x"
                              class="OraLink"
-                             onclick="_navSubmit('formId', 'goto', 'mainId:_idXXX',1,'1', '1',null);return false"
+                             onclick="_navSubmit('formId', 'goto', 'mainId:j_idXXX',1,'1', '1',null);return false"
                              type="button"
                             >
                           Ne
@@ -685,7 +685,7 @@
                 >
               
               <a
-                   onclick="submitForm('formId',1,{source:'mainId:_idXXX'});return false;"
+                   onclick="submitForm('formId',1,{source:'mainId:j_idXXX'});return false;"
                    href="uri-attr:encoded-action-url:#"
                   >
                 privacy
@@ -696,7 +696,7 @@
                 >
               
               <a
-                   onclick="submitForm('formId',1,{source:'mainId:_idXXX'});return false;"
+                   onclick="submitForm('formId',1,{source:'mainId:j_idXXX'});return false;"
                    href="uri-attr:encoded-action-url:#"
                   >
                 appAbout

Modified: incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/page-facets-minimalIE-golden.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/page-facets-minimalIE-golden.xml?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/page-facets-minimalIE-golden.xml (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/page-facets-minimalIE-golden.xml Thu Feb  1 17:00:47 2007
@@ -162,21 +162,21 @@
                           >
                         
                         <option
-                             value="submitForm('formId',1,{source:'mainId:_idXXX:_idXXX'});"
+                             value="submitForm('formId',1,{source:'mainId:j_idXXX:j_idXXX'});"
                              id="uri-attr:mainId:_idXXX:_idXXX"
                              name="uri-attr:mainId:_idXXX:_idXXX"
                             >
                           choice1
                         </option>
                         <option
-                             value="submitForm('formId',1,{source:'mainId:_idXXX:_idXXX'});"
+                             value="submitForm('formId',1,{source:'mainId:j_idXXX:j_idXXX'});"
                              id="uri-attr:mainId:_idXXX:_idXXX"
                              name="uri-attr:mainId:_idXXX:_idXXX"
                             >
                           choice2
                         </option>
                         <option
-                             value="submitForm('formId',1,{source:'mainId:_idXXX:_idXXX'});"
+                             value="submitForm('formId',1,{source:'mainId:j_idXXX:j_idXXX'});"
                              id="uri-attr:mainId:_idXXX:_idXXX"
                              name="uri-attr:mainId:_idXXX:_idXXX"
                             >
@@ -190,7 +190,7 @@
                       </span>
                       <button
                            class="af_navigationPane_choice-button"
-                           onclick="var navLevelSelect = document.getElementById('mainId:_idXXX_af_choice_select'); eval(navLevelSelect.options[navLevelSelect.selectedIndex].value); return false;"
+                           onclick="var navLevelSelect = document.getElementById('mainId:j_idXXX_af_choice_select'); eval(navLevelSelect.options[navLevelSelect.selectedIndex].value); return false;"
                            type="button"
                           >
                         Go
@@ -577,22 +577,22 @@
                              class="AFFieldText"
                              id="mainId:_idXXX"
                              name="mainId:_idXXX"
-                             onchange="_commandChoice('formId','mainId:_idXXX');return false;"
+                             onchange="_commandChoice('formId','mainId:j_idXXX');return false;"
                             >
                           
                           <option
                                selected="selected"
-                               value="mainId:null:0:_idXXX[1]"
+                               value="mainId:j_idXXX:0:j_idXXX[1]"
                               >
                             First
                           </option>
                           <option
-                               value="mainId:null:1:_idXXX[1]"
+                               value="mainId:j_idXXX:1:j_idXXX[1]"
                               >
                             Second
                           </option>
                           <option
-                               value="mainId:null:2:_idXXX[1]"
+                               value="mainId:j_idXXX:2:j_idXXX[1]"
                               >
                             Third
                           </option>
@@ -612,7 +612,7 @@
                         <button
                              accesskey="x"
                              class="OraLink"
-                             onclick="_navSubmit('formId', 'goto', 'mainId:_idXXX',1,'1', '1',null);return false"
+                             onclick="_navSubmit('formId', 'goto', 'mainId:j_idXXX',1,'1', '1',null);return false"
                              type="button"
                             >
                           Ne
@@ -658,7 +658,7 @@
                 >
               
               <a
-                   onclick="submitForm('formId',1,{source:'mainId:_idXXX'});return false;"
+                   onclick="submitForm('formId',1,{source:'mainId:j_idXXX'});return false;"
                    href="uri-attr:encoded-action-url:#"
                   >
                 privacy
@@ -669,7 +669,7 @@
                 >
               
               <a
-                   onclick="submitForm('formId',1,{source:'mainId:_idXXX'});return false;"
+                   onclick="submitForm('formId',1,{source:'mainId:j_idXXX'});return false;"
                    href="uri-attr:encoded-action-url:#"
                   >
                 appAbout

Modified: incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/page-facets-minimalIERtl-golden.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/page-facets-minimalIERtl-golden.xml?view=diff&rev=502428&r1=502427&r2=502428
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/page-facets-minimalIERtl-golden.xml (original)
+++ incubator/adffaces/branches/faces-1_2-070201/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/page-facets-minimalIERtl-golden.xml Thu Feb  1 17:00:47 2007
@@ -158,7 +158,7 @@
                       
                       <button
                            class="af_navigationPane_choice-button"
-                           onclick="var navLevelSelect = document.getElementById('mainId:_idXXX_af_choice_select'); eval(navLevelSelect.options[navLevelSelect.selectedIndex].value); return false;"
+                           onclick="var navLevelSelect = document.getElementById('mainId:j_idXXX_af_choice_select'); eval(navLevelSelect.options[navLevelSelect.selectedIndex].value); return false;"
                            type="button"
                           >
                         Go
@@ -174,21 +174,21 @@
                           >
                         
                         <option
-                             value="submitForm('formId',1,{source:'mainId:_idXXX:_idXXX'});"
+                             value="submitForm('formId',1,{source:'mainId:j_idXXX:j_idXXX'});"
                              id="uri-attr:mainId:_idXXX:_idXXX"
                              name="uri-attr:mainId:_idXXX:_idXXX"
                             >
                           choice1
                         </option>
                         <option
-                             value="submitForm('formId',1,{source:'mainId:_idXXX:_idXXX'});"
+                             value="submitForm('formId',1,{source:'mainId:j_idXXX:j_idXXX'});"
                              id="uri-attr:mainId:_idXXX:_idXXX"
                              name="uri-attr:mainId:_idXXX:_idXXX"
                             >
                           choice2
                         </option>
                         <option
-                             value="submitForm('formId',1,{source:'mainId:_idXXX:_idXXX'});"
+                             value="submitForm('formId',1,{source:'mainId:j_idXXX:j_idXXX'});"
                              id="uri-attr:mainId:_idXXX:_idXXX"
                              name="uri-attr:mainId:_idXXX:_idXXX"
                             >
@@ -197,7 +197,7 @@
                       </select>
                       <button
                            class="af_navigationPane_choice-button"
-                           onclick="var navLevelSelect = document.getElementById('mainId:_idXXX_af_choice_select'); eval(navLevelSelect.options[navLevelSelect.selectedIndex].value); return false;"
+                           onclick="var navLevelSelect = document.getElementById('mainId:j_idXXX_af_choice_select'); eval(navLevelSelect.options[navLevelSelect.selectedIndex].value); return false;"
                            type="button"
                           >
                         Go
@@ -589,22 +589,22 @@
                              class="AFFieldText"
                              id="mainId:_idXXX"
                              name="mainId:_idXXX"
-                             onchange="_commandChoice('formId','mainId:_idXXX');return false;"
+                             onchange="_commandChoice('formId','mainId:j_idXXX');return false;"
                             >
                           
                           <option
                                selected="selected"
-                               value="mainId:null:0:_idXXX[1]"
+                               value="mainId:j_idXXX:0:j_idXXX[1]"
                               >
                             First
                           </option>
                           <option
-                               value="mainId:null:1:_idXXX[1]"
+                               value="mainId:j_idXXX:1:j_idXXX[1]"
                               >
                             Second
                           </option>
                           <option
-                               value="mainId:null:2:_idXXX[1]"
+                               value="mainId:j_idXXX:2:j_idXXX[1]"
                               >
                             Third
                           </option>
@@ -624,7 +624,7 @@
                         <button
                              accesskey="x"
                              class="OraLink"
-                             onclick="_navSubmit('formId', 'goto', 'mainId:_idXXX',1,'1', '1',null);return false"
+                             onclick="_navSubmit('formId', 'goto', 'mainId:j_idXXX',1,'1', '1',null);return false"
                              type="button"
                             >
                           Ne
@@ -670,7 +670,7 @@
                 >
               
               <a
-                   onclick="submitForm('formId',1,{source:'mainId:_idXXX'});return false;"
+                   onclick="submitForm('formId',1,{source:'mainId:j_idXXX'});return false;"
                    href="uri-attr:encoded-action-url:#"
                   >
                 privacy
@@ -681,7 +681,7 @@
                 >
               
               <a
-                   onclick="submitForm('formId',1,{source:'mainId:_idXXX'});return false;"
+                   onclick="submitForm('formId',1,{source:'mainId:j_idXXX'});return false;"
                    href="uri-attr:encoded-action-url:#"
                   >
                 appAbout



Mime
View raw message