Improve euro currency handling on NumberTypeConverterSupport
-------------------------------------------------------------
Key: STS-783
URL: http://www.stripesframework.org/jira/browse/STS-783
Project: Stripes
Issue Type: Improvement
Components: Validation
Affects Versions: Release 1.5.4
Reporter: Rolf Suurd
When you have bound a text tag to a number property, and have added a
formatType="currency" attribute on that tag, submitting that form will result
in a validation error.
This is because the stripes formatter will add a white space between the euro
symbol and the number, for example € 20000,00.
The formatter does NOT do this with for example the dollar symbol ($20000.00).
I am not sure if this extra white space applies to the euro symbol only, i have
only tried euro and dollar currencies.
When parsing, the preprocess method on NumberTypeConverterSupport will remove
the (euro) currency symbol, but not the extra white space, resulting in the
validation error later on.
Right now i have to extend the BigIntegerTypeConverter (my currency properties
are all BigInteger) in order to trim the output of the preprocess method, so
that the white space gets removed once the currency symbol is gone. Then i can
drop my cusomt converter in a extension package and it all works, but it would
be nice if also euro currency can work out of the box.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development