Author |
Message |
20/08/2008 10:40:16
|
schmuck
Power User
Joined: 08/04/2008 16:27:16
Messages: 83
Offline
|
Hello,
I would like to have a formated field, that I can give a pattern like with the decimal format object.
e.g. pattern: "###,##0.00 €" the field contains a formated currency like (double)"12345.67" -> (String)"12.345,67 €"
The user should be able to input a numeric value with and without the € symbol. ( input: "10" or "10€" or "10,79" or "99,99 €")
Mapped to the bean should only be a double value.
Currently I use String Accessor methods and I am parsing the content by myself in this methods, but sutch a formated filed would be very convienient!
Thanks,
Michael Schmuck
|
|
|
21/08/2008 09:51:08
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5520
Offline
|
Does not sound to be too far from being resaonable...
We'll check...
Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
21/08/2008 14:05:43
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5520
Offline
|
Hi,
from next update on you can define the number of digits so that numbers are displayed in the way "###.###.###,##" (or ###,###,###.## or ###'###'###,## dependent from Locale). With the prefix/suffix we are still fighting...
Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
24/08/2008 21:08:09
|
schmuck
Power User
Joined: 08/04/2008 16:27:16
Messages: 83
Offline
|
prefix suffix is not so important than defining the pattern.
maybe you could apped an property with an list of chars with would be replaced to "" (String of length 0) - e.g. "€" replaced to "" so you can parse the value to double.
or you add an property (true/false), that indicates that all none numeric chars in input string would be replaced with ""
finally the getter provides the formated string like "###,##0.00 €"
Thanks,
Michael Schmuck
|
|
|
25/08/2008 14:00:17
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5520
Offline
|
...today's update contains the following impovement: when using float/double/bigdecimal as format for FORMATTEDFIELD then you can define "dec1","dec2",... in the FORMATMASK field (see value help). The formatting will be corresponding.
Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
|