incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r511932 - /incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java
Date Mon, 26 Feb 2007 18:00:09 GMT
Author: matzew
Date: Mon Feb 26 10:00:08 2007
New Revision: 511932

URL: http://svn.apache.org/viewvc?view=rev&rev=511932
Log:
ADFFACES-389 - NumberConverter should support 0X20 spaces as well as 0XA0

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java?view=diff&rev=511932&r1=511931&r2=511932
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java
Mon Feb 26 10:00:08 2007
@@ -221,6 +221,12 @@
     Locale locale = _getLocale(reqCtx, context);
 
     NumberFormat fmt = _getNumberFormat(pattern, type, locale, reqCtx);
+    
+    DecimalFormat df = (DecimalFormat)fmt;
+    DecimalFormatSymbols dfs = df.getDecimalFormatSymbols();
+    if (dfs.getGroupingSeparator() == '\u00a0')
+      value = value.replace(' ', '\u00a0');
+         
 
     ParsePosition pp = new ParsePosition(0);
     Number num = (Number) fmt.parseObject(value,pp);



Mime
View raw message