incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r466187 - in /incubator/adffaces/branches/faces-1_2-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal: context/ convert/ uinode/ uinode/bind/
Date Fri, 20 Oct 2006 16:32:38 GMT
Author: awiner
Date: Fri Oct 20 09:32:36 2006
New Revision: 466187

URL: http://svn.apache.org/viewvc?view=rev&rev=466187
Log:
Merge back JSF 1.2 modifications, one step at a time.  Having svn problems with some files

Added:
    incubator/adffaces/branches/faces-1_2-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/ValueExpressionBoundValue.java
      - copied unchanged from r466160, incubator/adffaces/branches/faces-1_2/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/ValueExpressionBoundValue.java
Removed:
    incubator/adffaces/branches/faces-1_2-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/ValueBindingBoundValue.java
Modified:
    incubator/adffaces/branches/faces-1_2-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/DialogServiceImpl.java
    incubator/adffaces/branches/faces-1_2-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java
    incubator/adffaces/branches/faces-1_2-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java
    incubator/adffaces/branches/faces-1_2-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/DateTimeConverter.java
    incubator/adffaces/branches/faces-1_2-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/UINodeFacesBean.java
    incubator/adffaces/branches/faces-1_2-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/bind/ConverterBoundValue.java

Modified: incubator/adffaces/branches/faces-1_2-second/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-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/DialogServiceImpl.java?view=diff&rev=466187&r1=466186&r2=466187
==============================================================================
--- incubator/adffaces/branches/faces-1_2-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/DialogServiceImpl.java
(original)
+++ incubator/adffaces/branches/faces-1_2-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/DialogServiceImpl.java
Fri Oct 20 09:32:36 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-second/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-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java?view=diff&rev=466187&r1=466186&r2=466187
==============================================================================
--- incubator/adffaces/branches/faces-1_2-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java
(original)
+++ incubator/adffaces/branches/faces-1_2-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FacesContextFactoryImpl.java
Fri Oct 20 09:32:36 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-second/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-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java?view=diff&rev=466187&r1=466186&r2=466187
==============================================================================
--- incubator/adffaces/branches/faces-1_2-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java
(original)
+++ incubator/adffaces/branches/faces-1_2-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java
Fri Oct 20 09:32:36 2006
@@ -195,7 +195,7 @@
     if (Boolean.TRUE.equals(requestMap.get(FORCED_PARTIAL_KEY)))
       return true;
     
-    Map<String, Object> parameters = context.getExternalContext().getRequestParameterMap();
+    Map<String, String> parameters = context.getExternalContext().getRequestParameterMap();
     if ("true".equals(parameters.get(XhtmlConstants.PARTIAL_PARAM)))
       return true;
 

Modified: incubator/adffaces/branches/faces-1_2-second/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-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/DateTimeConverter.java?view=diff&rev=466187&r1=466186&r2=466187
==============================================================================
--- incubator/adffaces/branches/faces-1_2-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/DateTimeConverter.java
(original)
+++ incubator/adffaces/branches/faces-1_2-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/DateTimeConverter.java
Fri Oct 20 09:32:36 2006
@@ -29,7 +29,7 @@
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.convert.ConverterException;
-import javax.faces.el.ValueBinding;
+import javax.el.ValueExpression;
 
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
@@ -108,10 +108,10 @@
     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,8 +157,7 @@
     {
       // =-=AEW Only if Javascript...
       // -= Simon Lessard =-
-      // FIXME: JSF 1.2 specifies <String, Object>
-      Map<Object, Object> requestMap = context.getExternalContext().getRequestMap();
+      Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
 
       // this fetch could be at the place where we append, but has been
       // moved ahead to optimize use of StringBuffer
@@ -515,7 +514,7 @@
 
   // RenderingContext key indicating the _dateFormat object
   // has been created
-  private static final Object _PATTERN_WRITTEN_KEY = "org.apache.myfaces.trinidadinternal.convert.DateTimeConverter._PATTERN_WRITTEN";
+  private static final String _PATTERN_WRITTEN_KEY = "org.apache.myfaces.trinidadinternal.convert.DateTimeConverter._PATTERN_WRITTEN";
 
   // String indicating that NO_JS_PATTERN is available
   private static final String _NO_JS_PATTERN = new String();

Modified: incubator/adffaces/branches/faces-1_2-second/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-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/UINodeFacesBean.java?view=diff&rev=466187&r1=466186&r2=466187
==============================================================================
--- incubator/adffaces/branches/faces-1_2-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/UINodeFacesBean.java
(original)
+++ incubator/adffaces/branches/faces-1_2-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/UINodeFacesBean.java
Fri Oct 20 09:32:36 2006
@@ -18,7 +18,7 @@
 import java.util.HashSet;
 import java.util.Set;
 
-import javax.faces.el.ValueBinding;
+import javax.el.ValueExpression;
 
 
 import org.apache.myfaces.trinidad.bean.FacesBean;
@@ -167,14 +167,14 @@
         AttributeKey attrKey = getAttributeKey(key);
         if (attrKey != null)
         {
-          // We're no longer shadowing a ValueBinding (if one's present);
+          // We're no longer shadowing a ValueExpression (if one's present);
           // re-establish that binding, or reset to null
           Object attrValue;
-          ValueBinding binding = getValueBinding(key);
-          if (binding == null)
+          ValueExpression expression = getValueExpression(key);
+          if (expression == null)
             attrValue = null;
           else
-            attrValue = new ValueBindingBoundValue(binding);
+            attrValue = new ValueExpressionBoundValue(expression);
 
           _node.setAttributeValue(attrKey, attrValue);
         }
@@ -186,9 +186,9 @@
   }
 
   @Override
-  protected PropertyMap createBindingsMap()
+  protected PropertyMap createExpressionsMap()
   {
-    FlaggedPropertyMap bindings = new FlaggedPropertyMap()
+    FlaggedPropertyMap expressions = new FlaggedPropertyMap()
     {
       @Override
       public Object put(PropertyKey key, Object value)
@@ -204,12 +204,12 @@
           if (attrKey != null)
           {
             // If there's no local value, then we're not shadowing;
-            // set up a new ValueBindingBoundValue
+            // set up a new ValueExpressionBoundValue
             if (getLocalProperty(key) == null)
             {
-              ValueBinding binding = (ValueBinding) value;
+              ValueExpression expression = (ValueExpression) value;
               _node.setAttributeValue(attrKey,
-                                      new ValueBindingBoundValue(binding));
+                                      new ValueExpressionBoundValue(expression));
             }
           }
 
@@ -236,8 +236,7 @@
       }
     };
 
-    bindings.setUseStateHolder(true);
-    return bindings;
+    return expressions;
   }
 
 

Modified: incubator/adffaces/branches/faces-1_2-second/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-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/bind/ConverterBoundValue.java?view=diff&rev=466187&r1=466186&r2=466187
==============================================================================
--- incubator/adffaces/branches/faces-1_2-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/bind/ConverterBoundValue.java
(original)
+++ incubator/adffaces/branches/faces-1_2-second/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/bind/ConverterBoundValue.java
Fri Oct 20 09:32:36 2006
@@ -15,9 +15,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;
@@ -52,15 +53,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);
       }
     }



Mime
View raw message