myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arobinso...@apache.org
Subject svn commit: r1607101 - in /myfaces/trinidad/trunk: trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/ trinidad-api/src/test/java/org/apache/myfaces/trinidad/bean/ trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/
Date Tue, 01 Jul 2014 14:47:42 GMT
Author: arobinson74
Date: Tue Jul  1 14:47:41 2014
New Revision: 1607101

URL: http://svn.apache.org/r1607101
Log:
TRINIDAD-2483 -- pass the EL context, not null, to expression getValue calls to support EL
specification changes that now are always using the ELContext

Modified:
    myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentELTag.java
    myfaces/trinidad/trunk/trinidad-api/src/test/java/org/apache/myfaces/trinidad/bean/FacesBeanImplTest.java
    myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ReturnActionListener.java

Modified: myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentELTag.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentELTag.java?rev=1607101&r1=1607100&r2=1607101&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentELTag.java
(original)
+++ myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentELTag.java
Tue Jul  1 14:47:41 2014
@@ -321,7 +321,8 @@ abstract public class UIXComponentELTag 
 
     if (expression.isLiteralText())
     {
-      bean.setProperty(key, TagUtils.parseNameTokens(expression.getValue(null)));
+      bean.setProperty(key, TagUtils.parseNameTokens(
+        expression.getValue(FacesContext.getCurrentInstance().getELContext())));
     }
     else
     {
@@ -348,7 +349,8 @@ abstract public class UIXComponentELTag 
 
     if (expression.isLiteralText())
     {
-      bean.setProperty(key, TagUtils.parseNameTokensAsList(expression.getValue(null)));
+      bean.setProperty(key, TagUtils.parseNameTokensAsList(
+        expression.getValue(FacesContext.getCurrentInstance().getELContext())));
     }
     else
     {
@@ -373,7 +375,8 @@ abstract public class UIXComponentELTag 
 
     if (expression.isLiteralText())
     {
-      bean.setProperty(key, TagUtils.parseNameTokensAsSet(expression.getValue(null)));
+      bean.setProperty(key, TagUtils.parseNameTokensAsSet(
+        expression.getValue(FacesContext.getCurrentInstance().getELContext())));
     }
     else
     {
@@ -397,7 +400,7 @@ abstract public class UIXComponentELTag 
 
     if (expression.isLiteralText())
     {
-      Object value = expression.getValue(null);
+      Object value = expression.getValue(FacesContext.getCurrentInstance().getELContext());
       if (value != null)
       {
         if (value instanceof Number)
@@ -437,7 +440,7 @@ abstract public class UIXComponentELTag 
 
     if (expression.isLiteralText())
     {
-      Object value = expression.getValue(null);
+      Object value = expression.getValue(FacesContext.getCurrentInstance().getELContext());
       if (value != null)
       {
         String[] strings = TagUtils.parseNameTokens(value);
@@ -498,7 +501,8 @@ abstract public class UIXComponentELTag 
 
     if (expression.isLiteralText())
     {
-      bean.setProperty(key, _parseISODate(expression.getValue(null)));
+      bean.setProperty(key, _parseISODate(
+        expression.getValue(FacesContext.getCurrentInstance().getELContext())));
     }
     else
     {
@@ -523,7 +527,7 @@ abstract public class UIXComponentELTag 
 
     if (expression.isLiteralText())
     {
-      Date d = _parseISODate(expression.getValue(null));
+      Date d = _parseISODate(expression.getValue(FacesContext.getCurrentInstance().getELContext()));
       Calendar c = Calendar.getInstance();
       TimeZone tz = RequestContext.getCurrentInstance().getTimeZone();
       if (tz != null)

Modified: myfaces/trinidad/trunk/trinidad-api/src/test/java/org/apache/myfaces/trinidad/bean/FacesBeanImplTest.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-api/src/test/java/org/apache/myfaces/trinidad/bean/FacesBeanImplTest.java?rev=1607101&r1=1607100&r2=1607101&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-api/src/test/java/org/apache/myfaces/trinidad/bean/FacesBeanImplTest.java
(original)
+++ myfaces/trinidad/trunk/trinidad-api/src/test/java/org/apache/myfaces/trinidad/bean/FacesBeanImplTest.java
Tue Jul  1 14:47:41 2014
@@ -27,6 +27,7 @@ import java.io.ObjectOutputStream;
 import java.util.Iterator;
 
 import javax.faces.el.ValueBinding;
+import javax.faces.context.FacesContext;
 
 import org.apache.myfaces.trinidad.bean.PropertyKey;
 
@@ -385,7 +386,8 @@ public class FacesBeanImplTest extends F
     assertEquals("subValue", sub.getSub());
     assertNotNull(sub.getValueBinding(TestBean.FIRST_KEY));
     assertEquals("FirstBinding",
-                 sub.getValueBinding(TestBean.FIRST_KEY).getValue(null));
+      sub.getValueBinding(TestBean.FIRST_KEY).getValue(
+        FacesContext.getCurrentInstance()));
     Integer[] items = sub.getItems();
     assertNotNull(items);
     assertEquals(2, items.length);
@@ -461,7 +463,7 @@ public class FacesBeanImplTest extends F
     ValueBinding vb = newBean.getValueBinding(SubTypeBean.FIRST_KEY);
     assertTrue(vb instanceof TestValueBinding);
     assertTrue(vb != vb1);
-    assertEquals(vb.getValue(null), "vbFirst");
+    assertEquals(vb.getValue(FacesContext.getCurrentInstance()), "vbFirst");
 
     // Now change the value binding, and verify the original
     // bean is unchanged

Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ReturnActionListener.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ReturnActionListener.java?rev=1607101&r1=1607100&r2=1607101&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ReturnActionListener.java
(original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ReturnActionListener.java
Tue Jul  1 14:47:41 2014
@@ -21,6 +21,7 @@ package org.apache.myfaces.trinidadinter
 import javax.el.ValueExpression;
 
 import javax.faces.component.StateHolder;
+import javax.faces.context.FacesContext;
 import javax.faces.event.ActionEvent;
 import javax.faces.event.ActionListener;
 
@@ -57,7 +58,7 @@ public class ReturnActionListener extend
   public void setValue(ValueExpression value)
   {
     if (value.isLiteralText())
-      setProperty(VALUE_KEY, value.getValue(null));
+      setProperty(VALUE_KEY, value.getValue(FacesContext.getCurrentInstance().getELContext()));
     else
       setValueExpression(VALUE_KEY, value);
   }



Mime
View raw message