Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 70861 invoked from network); 17 Jun 2008 01:22:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Jun 2008 01:22:16 -0000 Received: (qmail 45944 invoked by uid 500); 17 Jun 2008 01:22:17 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 45895 invoked by uid 500); 17 Jun 2008 01:22:17 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 45884 invoked by uid 99); 17 Jun 2008 01:22:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jun 2008 18:22:17 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mwessendorf@gmail.com designates 66.249.90.180 as permitted sender) Received: from [66.249.90.180] (HELO ik-out-1112.google.com) (66.249.90.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jun 2008 01:21:24 +0000 Received: by ik-out-1112.google.com with SMTP id c29so4665155ika.4 for ; Mon, 16 Jun 2008 18:21:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=7sxqm3nOlt+iXAsdNgpOFkSnIT942YMM+MrfczZh3nk=; b=SLhC76VvB8K8s8GjIsajQ5ryPqknw/a4duYlRpWB37ucPZ36GyBsmBlGVViWY2UxEf oMeuoX4mMbyNx+TVSm6QyHUQhRjFCl3ASviCehJA1JDbkgNYmag8nRC/U22A0Bu+h3ZQ Pzgw/Z7cC8dTdp7zwdHY9K07cSs1KU6D6zxB8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=SwfOy0N+ECNRJU0fs+5K6j9LdtM+U9YfUPvHkDEyvIdBLDOdNQR0G4RLXB+55SOsGR g+lYy+oAI1w6RW5PxuapnNf4RLaBrOd9QmRyXxSFAczhO7CmsDIPZs9KxVRGnx4IVAR5 PFMvjZ8g7LH+b9gKakMxFWUQFbHCLwZURQ7gc= Received: by 10.210.45.17 with SMTP id s17mr6884366ebs.9.1213665701049; Mon, 16 Jun 2008 18:21:41 -0700 (PDT) Received: by 10.210.27.9 with HTTP; Mon, 16 Jun 2008 18:21:40 -0700 (PDT) Message-ID: <71235db40806161821n40bc4e3fn739c19218731a453@mail.gmail.com> Date: Mon, 16 Jun 2008 18:21:40 -0700 From: "Matthias Wessendorf" Sender: mwessendorf@gmail.com To: "MyFaces Development" Subject: Re: NumberConverter has issue with BigDecimal In-Reply-To: <8f985b960806161819u68667481nbec34c59962f2ba4@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <71235db40806122145o14e089fbo11b5842d2fd3a082@mail.gmail.com> <71235db40806122221x8183b08o4a18fc406ebf3a7@mail.gmail.com> <8f985b960806130604h1f0740c0h4fc71c540932cedc@mail.gmail.com> <71235db40806161803tac5d35bnc2d7b20e259bcc22@mail.gmail.com> <8f985b960806161819u68667481nbec34c59962f2ba4@mail.gmail.com> X-Google-Sender-Auth: bfa8e5170be2d4bc X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Jun 16, 2008 at 6:19 PM, Mike Kienenberger wrote: > Yes, I believe that the sandbox uses Java 1.4. > > There's still other pitfalls to avoid with standard java parsing, though: > > http://www.ibm.com/developerworks/java/library/j-numberformat/index.html > > I thought this was covered in Tomahawk 610, but apparently not. > Adding a comment about it. thanks! -Matthias > > On 6/16/08, Matthias Wessendorf wrote: >> On Fri, Jun 13, 2008 at 6:04 AM, Mike Kienenberger wrote: >> >> > Use the sandbox convertNumber with a BigDecimal type. >> >> Ok, >> I don't use this now. >> Since Java5 there is a parseBigDecimal() on DecimalFormat. >> In Trinidad I just turn that guy on. So, that fixes it. >> >> Sandbox still still requires Java1.4, right? >> >> >> -matthias >> >> >> >> > >> > You may also want to take a few minutes and add the workaround for the >> > bug in the java currency parser (DecimalFormat) as described in >> > >> > http://issues.apache.org/jira/browse/TOMAHAWK-610 >> > >> > if it hasn't already been taken care of. >> > >> > On 6/13/08, Matthias Wessendorf wrote: >> >> On Thu, Jun 12, 2008 at 9:55 PM, Leonardo Uribe wrote: >> >> > BigDecimal converter could solve this problem, maybe this value is converted >> >> > as double or float as is. >> >> >> >> >> >> ok, the demo was a little bit to simple. >> >> We want currency formatting etc. Means what the convertNumber actually does. >> >> >> >> >> >> -Matthias >> >> >> >> >> >> > >> >> > regards >> >> > >> >> > Leonardo Uribe >> >> > >> >> > On Thu, Jun 12, 2008 at 11:45 PM, Matthias Wessendorf >> >> > wrote: >> >> >> >> >> >> Hi, >> >> >> >> >> >> perhaps someone of you knows a workaround for this: >> >> >> >> >> >> Take this JSP code: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> For instance, when the entered value is "333.111" the actual stored >> >> >> value is 333.1109999999999899955582804977893829345703125 >> >> >> >> >> >> I think the mathematic explanation for that in here: >> >> >> http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems >> >> >> >> >> >> My users want to have 333.111 instead of the accurate value... >> >> >> >> >> >> Any ideas? >> >> >> >> >> >> Thanks! >> >> >> >> >> >> -- >> >> >> Matthias Wessendorf >> >> >> >> >> >> further stuff: >> >> >> blog: http://matthiaswessendorf.wordpress.com/ >> >> >> sessions: http://www.slideshare.net/mwessendorf >> >> >> mail: matzew-at-apache-dot-org >> >> > >> >> > >> >> >> >> >> >> >> >> >> >> -- >> >> >> >> Matthias Wessendorf >> >> >> >> further stuff: >> >> blog: http://matthiaswessendorf.wordpress.com/ >> >> sessions: http://www.slideshare.net/mwessendorf >> >> mail: matzew-at-apache-dot-org >> >> >> > >> >> >> >> >> -- >> >> Matthias Wessendorf >> >> further stuff: >> blog: http://matthiaswessendorf.wordpress.com/ >> sessions: http://www.slideshare.net/mwessendorf >> mail: matzew-at-apache-dot-org >> > -- Matthias Wessendorf further stuff: blog: http://matthiaswessendorf.wordpress.com/ sessions: http://www.slideshare.net/mwessendorf mail: matzew-at-apache-dot-org