incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r449899 - in /incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml: SimpleSelectManyRenderer.java SimpleSelectOneRenderer.java
Date Tue, 26 Sep 2006 04:34:20 GMT
Author: awiner
Date: Mon Sep 25 21:34:16 2006
New Revision: 449899

URL: http://svn.apache.org/viewvc?view=rev&rev=449899
Log:
ADFFACES-151: SimpleSelectOneRenderer should not evaluate select items if value binding references
null;  patch from Martin Koci.  Also apply same fix to SimpleSelectManyRenderer

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

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyRenderer.java?view=diff&rev=449899&r1=449898&r2=449899
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyRenderer.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyRenderer.java
Mon Sep 25 21:34:16 2006
@@ -395,6 +395,13 @@
     UIComponent         component,
     FacesBean           bean) throws IOException
   {
+    // http://issues.apache.org/jira/browse/ADFFACES-151
+    // Getting default converter for null value leads to exception but
+    // if value of component is null than there is no need to perform
+    // this method
+    if (getValue(bean) == null)
+      return;
+
     Converter converter = getConverter(bean);
     if ( converter == null)
       converter = getDefaultConverter(context, bean);

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneRenderer.java?view=diff&rev=449899&r1=449898&r2=449899
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneRenderer.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneRenderer.java
Mon Sep 25 21:34:16 2006
@@ -305,10 +305,17 @@
   @Override
   protected void renderNonElementContent(
     FacesContext        context,
-    RenderingContext arc,
+    RenderingContext    arc,
     UIComponent         component,
     FacesBean           bean) throws IOException
   {
+    // http://issues.apache.org/jira/browse/ADFFACES-151
+    // Getting default converter for null value leads to exception but
+    // if value of component is null than there is no need to perform
+    // this method
+    if (getValue(bean) == null)
+      return;
+
     Converter converter = getConverter(bean);
     if ( converter == null)
       converter = getDefaultConverter(context, bean);



Mime
View raw message