You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2009/12/09 01:27:05 UTC

svn commit: r888659 - /myfaces/tomahawk/trunk/sandbox/core/src/main/resources/META-INF/componentClass11.vm

Author: lu4242
Date: Wed Dec  9 00:27:04 2009
New Revision: 888659

URL: http://svn.apache.org/viewvc?rev=888659&view=rev
Log:
TOMAHAWK-1358 getTableIndex: Integer to String (ClassCastException)

Modified:
    myfaces/tomahawk/trunk/sandbox/core/src/main/resources/META-INF/componentClass11.vm

Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/resources/META-INF/componentClass11.vm
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/resources/META-INF/componentClass11.vm?rev=888659&r1=888658&r2=888659&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/resources/META-INF/componentClass11.vm (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/resources/META-INF/componentClass11.vm Wed Dec  9 00:27:04 2009
@@ -168,7 +168,15 @@
 ## MYFACES-2006 use toString(), so Numeric ValueBinding could be converted as
 ## Strings and do not cause ClassCastException 
 ## (only applies for JSF 1.1 due to backward compatibility) 
-            return $utils.castIfNecessary($type) vb.getValue(getFacesContext()).toString();
+            Object value = vb.getValue(getFacesContext());
+            if (value == null)
+            {
+                return null;
+            }
+            else
+            {
+                return $utils.castIfNecessary($type) value.toString();
+            }
 #else
             return $utils.castIfNecessary($type) vb.getValue(getFacesContext());
 #end