You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2007/10/18 12:46:29 UTC
svn commit: r585923 -
/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/NumberConverter.js
Author: matzew
Date: Thu Oct 18 03:46:28 2007
New Revision: 585923
URL: http://svn.apache.org/viewvc?rev=585923&view=rev
Log:
added check for null or empty string inside of getAsObject
(true for trunk as well)
Modified:
myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/NumberConverter.js
Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/NumberConverter.js
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/NumberConverter.js?rev=585923&r1=585922&r2=585923&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/NumberConverter.js (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/NumberConverter.js Thu Oct 18 03:46:28 2007
@@ -212,6 +212,16 @@
label
)
{
+ // The following are from the javadoc for Number and DateTimeConverter.
+ // If the specified String is null, return a null. Otherwise, trim leading and trailing whitespace before proceeding.
+ // If the specified String - after trimming - has a zero length, return null.
+ if (numberString == null)
+ return null;
+
+ numberString = TrUIUtils.trim(numberString);
+ if (numberString.length == 0)
+ return null
+
if(this._isConvertible())
{
var parsedValue;