struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hubert Rabago" <hrab...@gmail.com>
Subject Re: [Fwd: Help with using formaKey attribute for display dollar values]
Date Tue, 28 Nov 2006 21:17:00 GMT
Did you declared the variable that holds the "1896 / 100" value as int?

On 11/28/06, robin bajaj <robinbajaj@gmail.com> wrote:
> Sorry I forgot to mention,
> I am actually dividing the 1896 cents by 100 before the jsp page
> to make the value 18.96 and then display it using the formatkey as
> $18.00.
>
> I would appreciate a formatKey pattern that could convert 1896 straight
> into $18.96 (without me having to divide it by 100).
>
> Thanks a lot,
> robin.
>
>
>
> ---------- Forwarded message ----------
> From: robin bajaj <robinbajaj@gmail.com>
> To: Struts Users Mailing List <user@struts.apache.org>
> Date: Tue, 28 Nov 2006 16:04:39 -0500
> Subject: Help with using formaKey attribute for display dollar values
> Hi Folks,
> If I have an int value ( showing number of cents) in session scope that
> is going to get displayed on the JSP as dollar value.
> I am using the following tag
>
> <bean:write name="XYZProfileDTO" property="double_ABCDollarsAvailable"
> formatKey="format.msf"  scope="session"/>
>
> where I have the following key defined in my .properties file
>
> format.msf=$#,##0.00
>
> But the above converts a value of 1896 cents to $18.00
>
> How can I make it show up as $ 18.96 itself.?
>
> Any help would be much appreciated,
> regards,
> robin.
>
>
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message