Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 95487 invoked from network); 30 May 2006 21:04:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 May 2006 21:04:25 -0000 Received: (qmail 97570 invoked by uid 500); 30 May 2006 21:04:23 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 97510 invoked by uid 500); 30 May 2006 21:04:22 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 97499 invoked by uid 99); 30 May 2006 21:04:22 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 May 2006 14:04:22 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 May 2006 14:04:21 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D316E7142F9 for ; Tue, 30 May 2006 21:03:31 +0000 (GMT) Message-ID: <5779935.1149023011861.JavaMail.jira@brutus> Date: Tue, 30 May 2006 21:03:31 +0000 (GMT+00:00) From: "Thomas Lutz (JIRA)" To: dev@cocoon.apache.org Subject: [jira] Commented: (COCOON-1606) [BUG+PATCH] FormattingDecimalConvertor.java does not parse in BigDecimal mode MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/COCOON-1606?page=comments#action_12413901 ] Thomas Lutz commented on COCOON-1606: ------------------------------------- Hi Antonio, I retested in cocoon zones (latest 2.1 code, trunk was not working) and had a look at the sources (trunk: see [1]) and still found the described BigDecimal problem not fixed. Maybe my fault, my description is not very clear, the problem with the long value loosing accuracy in form1 of the form samples is not fixed my by patch, it's just in the description because I did not find a example with a BigDecimal in the samples. Try the following to reproduce the problem: Form definition: aBigDecimal #.00 Form binding: Basically only the decimalFormat.setParseBigDecimal(true) is missing. If you enter something big enough to require a BigDecimal in the form, the entered value is "truncated" while binding takes place. As described in my original description, this can be seen if you trigger a validation error, then the reloaded value is not equal to the original value. Sorry, that's all I could "reconstruct" from memory and the patch, as I changed job/project, I lost my cocoon environment... but if you need additional help, just send me a mail, then I'll set up everything again. kind regards, tom [1] http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/datatype/convertor/FormattingDecimalConvertor.java?revision=392574&view=markup > [BUG+PATCH] FormattingDecimalConvertor.java does not parse in BigDecimal mode > ----------------------------------------------------------------------------- > > Key: COCOON-1606 > URL: http://issues.apache.org/jira/browse/COCOON-1606 > Project: Cocoon > Type: Bug > Components: Blocks: Forms > Versions: 2.1.8 > Environment: Operating System: other > Platform: All > Reporter: Thomas Lutz > Assignee: Cocoon Developers Team > Attachments: FormattingDecimalConvertor.java.tar.gz > > This patch enables BigDecimal parsing in FormattingDecimalConvertor. > Basically if you have a widget with datatype decimal and enter a very large > number, something like 999999991999999999199999999919999999991 and submit > the form you'll get someting like a rounded value in technical notation. > same thing with datatype long, to be seen in the samples at > http://cocoon.zones.apache.org/demos/release/samples/blocks/forms/form1 > click NumberFields to change tab and enter > 999999991999999999199999999919999999991 > into "Enter another number, larger than the other number:" > submit, then you get as value for the same field: > 9,223,372,036,854,775,807 > which is quite the same, though its no BigDecimal problem. > at least some kind of validation error should occur... but a webapp > changing user submitted values without a hint is a rather hot thing :-). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira