From adffaces-commits-return-951-apmail-incubator-adffaces-commits-archive=incubator.apache.org@incubator.apache.org Tue Oct 10 16:48:08 2006 Return-Path: Delivered-To: apmail-incubator-adffaces-commits-archive@locus.apache.org Received: (qmail 98960 invoked from network); 10 Oct 2006 16:48:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Oct 2006 16:48:08 -0000 Received: (qmail 4647 invoked by uid 500); 10 Oct 2006 16:47:55 -0000 Delivered-To: apmail-incubator-adffaces-commits-archive@incubator.apache.org Received: (qmail 4536 invoked by uid 500); 10 Oct 2006 16:47:54 -0000 Mailing-List: contact adffaces-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: adffaces-dev@incubator.apache.org Delivered-To: mailing list adffaces-commits@incubator.apache.org Received: (qmail 4463 invoked by uid 99); 10 Oct 2006 16:47:54 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Oct 2006 09:47:54 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Oct 2006 09:47:52 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 1B4CA1A981A; Tue, 10 Oct 2006 09:47:32 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r454820 - /incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java Date: Tue, 10 Oct 2006 16:47:32 -0000 To: adffaces-commits@incubator.apache.org From: matzew@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061010164732.1B4CA1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: matzew Date: Tue Oct 10 09:47:31 2006 New Revision: 454820 URL: http://svn.apache.org/viewvc?view=rev&rev=454820 Log: very minor changes, typo and removing adfFaces var name... 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=454820&r1=454819&r2=454820 ============================================================================== --- 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 Tue Oct 10 09:47:31 2006 @@ -84,7 +84,7 @@ * // appropriately as specified in the documentation for the corresponding * // message id. * - * setConvertMessageDetail(convertNumberMessageDetail); + * setConvertNumberMessageDetail(convertNumberMessageDetail); * * This way user can override detail part of the {@link FacesMessage} for * different conversion errors that occur for wrong values, that arise @@ -216,9 +216,9 @@ } Locale locale = _getLocale(context); - RequestContext adfFacesCtx = RequestContext.getCurrentInstance(); + RequestContext reqCtx = RequestContext.getCurrentInstance(); - NumberFormat fmt = _getNumberFormat(pattern, type, locale, adfFacesCtx); + NumberFormat fmt = _getNumberFormat(pattern, type, locale, reqCtx); ParsePosition pp = new ParsePosition(0); Number num = (Number) fmt.parseObject(value,pp); @@ -293,15 +293,15 @@ Locale locale = _getLocale(context); - RequestContext adfFacesCtx = RequestContext.getCurrentInstance(); + RequestContext reqCtx = RequestContext.getCurrentInstance(); - NumberFormat formatter = _getNumberFormat(pattern, type, locale, adfFacesCtx); + NumberFormat formatter = _getNumberFormat(pattern, type, locale, reqCtx); _setFormatProperties(formatter); if("currency".equals(type)) { - _setCurrencyFormattingProperties(adfFacesCtx, formatter); + _setCurrencyFormattingProperties(reqCtx, formatter); } return formatter.format(value); @@ -802,7 +802,7 @@ String pattern, String type, Locale locale, - RequestContext adfFacesCtx + RequestContext reqCtx ) { NumberFormat nfmt; @@ -825,7 +825,7 @@ // what we get here is a shallow copy. cloned DFS DecimalFormatSymbols dfSymbols = dfmt.getDecimalFormatSymbols(); - _setUpDecimalSymbolFormatProperties(dfSymbols, adfFacesCtx, locale); + _setUpDecimalSymbolFormatProperties(dfSymbols, reqCtx, locale); //since we get a shallow copy - setting it again after modification. ((DecimalFormat) nfmt).setDecimalFormatSymbols(dfSymbols); @@ -846,18 +846,18 @@ private void _setUpDecimalSymbolFormatProperties( DecimalFormatSymbols symbols, - RequestContext adfFacesCtx, + RequestContext reqCtx, Locale locale ) { - if (adfFacesCtx != null) + if (reqCtx != null) { char ch = (char) 0; - if ((ch = adfFacesCtx.getDecimalSeparator()) != (char)0) + if ((ch = reqCtx.getDecimalSeparator()) != (char)0) symbols.setDecimalSeparator(ch); - if ((ch = adfFacesCtx.getNumberGroupingSeparator()) != (char)0) + if ((ch = reqCtx.getNumberGroupingSeparator()) != (char)0) symbols.setGroupingSeparator(ch); }