cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Lutz (JIRA)" <>
Subject [jira] Commented: (COCOON-1606) [BUG+PATCH] does not parse in BigDecimal mode
Date Tue, 30 May 2006 21:03:31 GMT
    [ ] 

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:
<fd:field id="aBigDecimal" required="true">
    <fd:datatype base="decimal">
    <fd:convertor variant="number">

Form binding:
<fb:value id="aBigDecimal" path="field[@name='aBigDecimal']">
<fd:convertor datatype="decimal"/>

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,


> [BUG+PATCH] does not parse in BigDecimal mode
> -----------------------------------------------------------------------------
>          Key: COCOON-1606
>          URL:
>      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:
> 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
> 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:
For more information on JIRA, see:

View raw message