You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by gc...@apache.org on 2009/01/06 22:08:00 UTC
svn commit: r732120 -
/myfaces/trinidad/trunk_1.2.x/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CoreFormat.js
Author: gcrawford
Date: Tue Jan 6 13:08:00 2009
New Revision: 732120
URL: http://svn.apache.org/viewvc?rev=732120&view=rev
Log:
TRINIDAD-1360 error in doubleconverter
Doubleconverter ignores locale, so it just does this on the server
* getAsString() --> return Double.toString(((Number)value).doubleValue());
* getAsObject() --> return Double.valueOf(stringValue);
On the client it does something similar to the server for getAsString.
However on the client for getAsObject it's calling _decimalParse, which uses localeSymbols to parse, which means it's using locale specific formatting on the client to interpret the string to an object.
Changed the _decimalParse function to take an optional boolean to ignore the locale symbols for parsing and send in true for double and float converter.
Modified:
myfaces/trinidad/trunk_1.2.x/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CoreFormat.js
Modified: myfaces/trinidad/trunk_1.2.x/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CoreFormat.js
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk_1.2.x/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CoreFormat.js?rev=732120&r1=732119&r2=732120&view=diff
==============================================================================
--- myfaces/trinidad/trunk_1.2.x/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CoreFormat.js (original)
+++ myfaces/trinidad/trunk_1.2.x/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CoreFormat.js Tue Jan 6 13:08:00 2009
@@ -256,6 +256,7 @@
this._maxValue,
this._minValue,
label,
+ true,
true);
}
function TrFloatConverter(
@@ -308,6 +309,7 @@
this._maxValue,
this._minValue,
label,
+ true,
true);
}
@@ -887,7 +889,8 @@
maxValue,
minValue,
label,
- parsefloat
+ parsefloat,
+ ignoreLocaleSymbols
)
{
// The following are from the javadoc for TrNumberConverter
@@ -904,7 +907,7 @@
// Get LocaleSymbols (from Locale.js)
var symbols = getLocaleSymbols();
- if (symbols)
+ if (symbols && (ignoreLocaleSymbols != true))
{
// We don't want leading or trailing grouping separators
var grouping = symbols.getGroupingSeparator();