You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by chamal desilva <ch...@yahoo.com> on 2007/05/18 04:11:17 UTC
formatKey negative numbers
Hi,
I am using bean:write tag to display properties
(return type Double) of my form bean.
I am also using formatKey attribute to format the
output.
This is the format key I have mentioned in
ApplicationResources.properties file.
display.currency=#,## 0.00
Formatting works fine. But negative numbers are NOT
displayed with minus character. How can I format
negative numbers to be displayed with minus character.
My other question is can I format negative numbers
within brackets.
Thanking You,
Chamal.
____________________________________________________________________________________Yahoo! oneSearch: Finally, mobile search
that gives answers, not web links.
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: formatKey negative numbers
Posted by Nuwan Chandrasoma <my...@gmail.com>.
Hi,
the <bean:write> is using the
http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html to
format number, you can get a idea from this page how to format numbers,
Thanks,
Nuwan
----- Original Message -----
From: "chamal desilva" <ch...@yahoo.com>
To: <us...@struts.apache.org>
Sent: Friday, May 18, 2007 2:11 AM
Subject: formatKey negative numbers
> Hi,
>
> I am using bean:write tag to display properties
> (return type Double) of my form bean.
>
> I am also using formatKey attribute to format the
> output.
>
> This is the format key I have mentioned in
> ApplicationResources.properties file.
>
> display.currency=#,## 0.00
>
> Formatting works fine. But negative numbers are NOT
> displayed with minus character. How can I format
> negative numbers to be displayed with minus character.
>
> My other question is can I format negative numbers
> within brackets.
>
> Thanking You,
> Chamal.
>
>
>
>
>
>
>
>
> ____________________________________________________________________________________Yahoo!
> oneSearch: Finally, mobile search
> that gives answers, not web links.
> http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org