incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r421664 - /incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/SimpleSelectBooleanRenderer.java
Date Thu, 13 Jul 2006 16:37:56 GMT
Author: awiner
Date: Thu Jul 13 09:37:55 2006
New Revision: 421664

URL: http://svn.apache.org/viewvc?rev=421664&view=rev
Log:
ADFFACES-38: Converter getAsString isn't called in af:selectBooleanCheckBox.  Commit patch
provided by Pierre-Luc Archambault off of solution by Arnaud Mergey

Modified:
    incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/SimpleSelectBooleanRenderer.java

Modified: incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/SimpleSelectBooleanRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/SimpleSelectBooleanRenderer.java?rev=421664&r1=421663&r2=421664&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/SimpleSelectBooleanRenderer.java
(original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/SimpleSelectBooleanRenderer.java
Thu Jul 13 09:37:55 2006
@@ -132,11 +132,14 @@
     writer.writeAttribute("value", getValueAttr(arc), null);
     
     Object value = getSubmittedValue(bean);
-    if ( value == null)
+    if (value == null)
       value = getValue(bean);
-                                    
+    
+    if (!(value instanceof Boolean)) 
+      value = Boolean.valueOf(getConvertedString(context, component, bean)); 
+
     if ( Boolean.TRUE.equals(value))  
-      writer.writeAttribute("checked", Boolean.TRUE, "value");                          
       
+      writer.writeAttribute("checked", Boolean.TRUE, "value");
 
     writer.endElement("input");
     
@@ -206,6 +209,9 @@
     Object value = getSubmittedValue(bean);
     if ( value == null)
       value = getValue(bean);
+
+    if (!(value instanceof Boolean)) 
+      value = Boolean.valueOf(getConvertedString(context, component, bean)); 
 
     boolean selected = Boolean.TRUE.equals(value);
     boolean disabled = getDisabled(bean);



Mime
View raw message