myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r627917 - /myfaces/core/trunk_1.2.x/api/src/main/java/javax/faces/component/_SharedRendererUtils.java
Date Fri, 15 Feb 2008 00:28:43 GMT
Author: lu4242
Date: Thu Feb 14 16:28:42 2008
New Revision: 627917

URL: http://svn.apache.org/viewvc?rev=627917&view=rev
Log:
fix MYFACES-1819 h:selectManyCheckbox with value="#{bean.map['somekey']}" fails

Modified:
    myfaces/core/trunk_1.2.x/api/src/main/java/javax/faces/component/_SharedRendererUtils.java

Modified: myfaces/core/trunk_1.2.x/api/src/main/java/javax/faces/component/_SharedRendererUtils.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk_1.2.x/api/src/main/java/javax/faces/component/_SharedRendererUtils.java?rev=627917&r1=627916&r2=627917&view=diff
==============================================================================
--- myfaces/core/trunk_1.2.x/api/src/main/java/javax/faces/component/_SharedRendererUtils.java
(original)
+++ myfaces/core/trunk_1.2.x/api/src/main/java/javax/faces/component/_SharedRendererUtils.java
Thu Feb 14 16:28:42 2008
@@ -79,7 +79,13 @@
         Class arrayComponentType = null;
         if (expression != null)
         {
-            valueType = expression.getType(facesContext.getELContext());
+            //By some strange reason vb.getType(facesContext.getELContext());
+            //does not return the same as vb.getValue(facesContext.getELContext()).getClass(),
+            //so we need to use this instead.
+            Object value = expression.getValue(facesContext.getELContext()); 
+            valueType = (value != null) ? value.getClass() :
+                expression.getType(facesContext.getELContext()) ;
+            
             if (valueType != null && valueType.isArray())
             {
                 arrayComponentType = valueType.getComponentType();



Mime
View raw message