hi,

i do this:


import java.text.DecimalFormat;

DecimalFormat df1 = new DecimalFormat("######.00");
System.out.println("Locale:"+Locale.getDefault());
//Locale.setDefault(Locale.GERMAN); //for reference

context.put("numberstring",df1.format("123.2309278382728378237476"));

regards,

rhys

----- Original Message -----
From: "Maciej Leks" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 05, 2001 3:17 PM
Subject: BigDeciaml problem


> Hi
>
>   In my database scheme I use DECIMAL field type, i.e.
> ..
> <column name="price" required="true" size="8,2" type="DECIMAL">
> ..
> It is wrapped as a BigDeciaml object by the Peer.And here is a problem
> because when I put this object into the Velocity context a value
> (String) represted by this object is wrongly formated, i.e
> Let's consider situation:
>       In the databese we have: 123.23
>       But in the Velocity context: 123.2309278382728378237476
> Up to now I have to transform the object by hand before I put this
> into the context, but it's not good solution!!!
>
> My question is:
> Has anyone walk round this problem?
>
> Thanx
>
> --
>
>  Leksiu ([EMAIL PROTECTED])
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to