myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r694484 - /myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneRenderer.java
Date Thu, 11 Sep 2008 21:10:13 GMT
Author: matzew
Date: Thu Sep 11 14:10:12 2008
New Revision: 694484

URL: http://svn.apache.org/viewvc?rev=694484&view=rev
Log:
TRINIDAD-1225 - EL will not convert class java.lang.Integer to class custom class for selectOne
components

fix is to run the converter, when present.

Modified:
    myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneRenderer.java

Modified: myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneRenderer.java?rev=694484&r1=694483&r2=694484&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneRenderer.java
(original)
+++ myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneRenderer.java
Thu Sep 11 14:10:12 2008
@@ -215,9 +215,18 @@
 
     SelectItem item = selectItems.get(index);
     if (item != null)
-      return item.getValue();
+    {
+      Object converted = item.getValue();
+      if (converter != null)
+      {
+        converted = converter.getAsObject(context, component, converted.toString());
+      }
+      return converted;
+    }
     else
+    {
       return null;
+    }
   }
 
 



Mime
View raw message