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 2008/06/28 18:03:34 UTC

svn commit: r672536 - /myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/NumberConverter.js

Author: matzew
Date: Sat Jun 28 09:03:34 2008
New Revision: 672536

URL: http://svn.apache.org/viewvc?rev=672536&view=rev
Log:
when there is no client side conversion possible, we always return undefined.
This avoids mixed conversions...

Modified:
    myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/NumberConverter.js

Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/NumberConverter.js
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/NumberConverter.js?rev=672536&r1=672535&r2=672536&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/NumberConverter.js (original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/NumberConverter.js Sat Jun 28 09:03:34 2008
@@ -212,18 +212,18 @@
   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())
   {
+    // 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
+
     var parsedValue;
     if(this._type=="percent" || this._type=="currency")
     {