struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zoran Avtarovski <zo...@sparecreative.com>
Subject Re: Display BigDecimal Format
Date Thu, 05 Mar 2009 11:50:22 GMT
Thanks Seshagari,

But I¹d have to do this in every action and on every form. I might just
write a customConverter for BigDecimals and place it in my xwork properties
file.

Z.
> 
> Hi
> 
> Follows  anapest code,  in  your action class. Me be resolved  your problem.
> // Round two decimal function
>     double roundTwoDecimals(double amout) {
>         DecimalFormat twoCurrencyDecimalForm = new
> DecimalFormat(getText("#.##"));
>         return Double.valueOf(twoCurrencyDecimalForm.format(amout));
>     }
> 
> Thank you,
> Seshagiri V
> seshagiriv@kensium.com.
>  
> US Main: 877 KENSIUM (536.7486)
> US Fax:   312.242.3029
>  
> Kensium
> 200 S Wacker Dr, Suite 3100
> Chicago, IL 60606
>  
> Confidentiality Note:
> -----------------------------
> The information contained in this e-mail is strictly confidential and for
> the intended use of the addressee only. Any disclosure, use or copying of
> the information by anyone other than the intended recipient is prohibited.
> If you have received this message in error, please notify the sender
> immediately by return e-mail and securely discard this message.
>  
>  
> 
> -----Original Message-----
> From: Zoran Avtarovski [mailto:zoran@sparecreative.com]
> Sent: Thursday, March 05, 2009 3:49 PM
> To: Struts Users Mailing List
> Subject: Display BigDecimal Format
> 
> Our forms have some currency and and we need to display to 2 decimal points
> when the data is prepopulated.
> 
> At the moment is displays as a single decimal point. I could specify all the
> relevant fields in a package.properties file but I¹d like to do it across
> the board for big decimals.
> 
> Do I have to create a custom type converter or is there a property I could
> set.
> 
> Z.
> 
> 
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.0.237 / Virus Database: 270.11.8/1984 - Release Date: 03/04/09
> 19:17:00
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message