[
http://www.stripesframework.org/jira/browse/STS-846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12394#comment-12394
]
Iwao AVE! commented on STS-846:
-------------------------------
I think you need to use BigDecimal instead of Double, then.
And create a custom formatter for BigDecimal and drop it in the Stripes'
extension package (DefaultFormatterFactory uses the best match).
The format() method of the BigDecimal formatter should look as follows.
public String format(BigDecimal input) {
return input.toPlainString();
}
p.s.
As BigDecimalTypeConverter exists (STS-10), adding BigDecimalFormatter to the
core might make sense.
Hope this helps,
Iwao
> Strange behavior with Double fields
> -----------------------------------
>
> Key: STS-846
> URL: http://www.stripesframework.org/jira/browse/STS-846
> Project: Stripes
> Issue Type: Bug
> Components: Formatting
> Affects Versions: Release 1.5.6
> Reporter: Samuel Santos
> Priority: Critical
>
> I have a strange behavior with fields using the type Double.
> If I submit a form with a double field in it and get a validation error (e.g.
> a different required field that is missing), the input is populated with the
> exact value that I have inserted (e.g. 3.123456789).
> But if I do not trigger a validation error and forward to the same JSP page,
> the input is populated with the right value but trimmed to only 3 decimal
> cases (e.g. 3.123).
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops? How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development