incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r475506 - /incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ValueRenderer.java
Date Thu, 16 Nov 2006 00:39:28 GMT
Author: awiner
Date: Wed Nov 15 16:39:28 2006
New Revision: 475506

URL: http://svn.apache.org/viewvc?view=rev&rev=475506
Log:
ADFFACES-285: Converter not getting called with null value in inputText.  The fix - and for
that matter, the bug - applies to *all* components with a value.

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ValueRenderer.java

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ValueRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ValueRenderer.java?view=diff&rev=475506&r1=475505&r2=475506
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ValueRenderer.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ValueRenderer.java
Wed Nov 15 16:39:28 2006
@@ -46,11 +46,12 @@
     FacesBean    bean)
   {
     Object value = getValue(bean);
-    if (value == null)
-      return null;
-
     Converter converter = getConverter(bean);
-    if ((converter == null) && !(value instanceof String))
+    // If there's no explicitly set converter, and the value is non-null
+    // and not a String, try to get a default converter
+    if ((converter == null) &&
+        (value != null) &&
+        !(value instanceof String))
       converter = getDefaultConverter(context, bean);
 
     if (converter != null)
@@ -58,7 +59,7 @@
       return converter.getAsString(context, component, value);
     }
 
-    return value.toString();
+    return toString(value);
   }
 
 



Mime
View raw message