myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From caga...@apache.org
Subject svn commit: r518388 - /myfaces/shared/branches/3_0_0/core/src/main/java/org/apache/myfaces/shared/renderkit/_SharedRendererUtils.java
Date Wed, 14 Mar 2007 23:54:46 GMT
Author: cagatay
Date: Wed Mar 14 16:54:46 2007
New Revision: 518388

URL: http://svn.apache.org/viewvc?view=rev&rev=518388
Log:
Fix for MYFACES-1562, replaced valueexpression with valuebinding

Modified:
    myfaces/shared/branches/3_0_0/core/src/main/java/org/apache/myfaces/shared/renderkit/_SharedRendererUtils.java

Modified: myfaces/shared/branches/3_0_0/core/src/main/java/org/apache/myfaces/shared/renderkit/_SharedRendererUtils.java
URL: http://svn.apache.org/viewvc/myfaces/shared/branches/3_0_0/core/src/main/java/org/apache/myfaces/shared/renderkit/_SharedRendererUtils.java?view=diff&rev=518388&r1=518387&r2=518388
==============================================================================
--- myfaces/shared/branches/3_0_0/core/src/main/java/org/apache/myfaces/shared/renderkit/_SharedRendererUtils.java
(original)
+++ myfaces/shared/branches/3_0_0/core/src/main/java/org/apache/myfaces/shared/renderkit/_SharedRendererUtils.java
Wed Mar 14 16:54:46 2007
@@ -18,6 +18,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import javax.el.ValueExpression;
 import javax.faces.FacesException;
 import javax.faces.component.UISelectMany;
 import javax.faces.component.UIOutput;
@@ -39,7 +40,7 @@
  */
 class _SharedRendererUtils
 {
-    static Converter findUIOutputConverter(FacesContext facesContext, UIOutput component)
+	static Converter findUIOutputConverter(FacesContext facesContext, UIOutput component)
     {
         // Attention!
         // This code is duplicated in jsfapi component package.
@@ -48,11 +49,11 @@
         Converter converter = component.getConverter();
         if (converter != null) return converter;
 
-        //Try to find out by value binding
-        ValueBinding vb = component.getValueBinding("value");
-        if (vb == null) return null;
+        //Try to find out by value expression
+        ValueExpression expression = component.getValueExpression("value");
+        if (expression == null) return null;
 
-        Class valueType = vb.getType(facesContext);
+        Class valueType = expression.getType(facesContext.getELContext());
         if (valueType == null) return null;
 
         if (Object.class.equals(valueType)) return null;    //There is no converter for Object
class



Mime
View raw message