You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by elyes sallem <el...@gmail.com> on 2009/04/02 14:54:45 UTC

display Bigdecimal with 3 number after the ,

Hello,
i work with struts 1.2 and i wanna display in the jsp page Bigdecimal number
with 3 number after the comma
any one know how can i do that?
by default, it is displayed 1 comma after the comma

Thanks
Regards
Elyes.

Re: display Bigdecimal with 3 number after the ,

Posted by Lukasz Lenart <lu...@googlemail.com>.
2009/4/2 Lukasz Lenart <lu...@googlemail.com>:
> <fmt:formatNumber pattern="#,###,###" value="${myForm.myBigDecimal}"/>

it should be
<fmt:formatNumber pattern="#,###,###.###" value="${myForm.myBigDecimal}"/>


Regards
-- 
Lukasz
http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: display Bigdecimal with 3 number after the ,

Posted by Lukasz Lenart <lu...@googlemail.com>.
2009/4/2 elyes sallem <el...@gmail.com>:
> yes i viewed , this is  for struts 2 but i work with struts 1.2

Sorry, I missed that ;-(

You can use JSTL

<fmt:formatNumber pattern="#,###,###" value="${myForm.myBigDecimal}"/>


Regards
-- 
Lukasz
http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: display Bigdecimal with 3 number after the ,

Posted by Paweł Wielgus <po...@gmail.com>.
Hi Elyes,
try myBigDecimalValue.setScale(3) or something like that.

Best greetings,
Paweł Wielgus.




2009/4/2 elyes sallem <el...@gmail.com>:
> yes i viewed , this is  for struts 2 but i work with struts 1.2
>
> Regards
> Elyes
>
>
> 2009/4/2 Lukasz Lenart <lu...@googlemail.com>
>
>> 2009/4/2 elyes sallem <el...@gmail.com>:
>> > Hello,
>> > i work with struts 1.2 and i wanna display in the jsp page Bigdecimal
>> number
>> > with 3 number after the comma
>> > any one know how can i do that?
>> > by default, it is displayed 1 comma after the comma
>>
>> Did you read documentation [1] about that?
>>
>> [1] http://struts.apache.org/2.1.6/docs/formatting-dates-and-numbers.html
>>
>>
>> Regards
>> --
>> Lukasz
>> http://www.lenart.org.pl/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
> --
> Elyes.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: display Bigdecimal with 3 number after the ,

Posted by elyes sallem <el...@gmail.com>.
yes i viewed , this is  for struts 2 but i work with struts 1.2

Regards
Elyes


2009/4/2 Lukasz Lenart <lu...@googlemail.com>

> 2009/4/2 elyes sallem <el...@gmail.com>:
> > Hello,
> > i work with struts 1.2 and i wanna display in the jsp page Bigdecimal
> number
> > with 3 number after the comma
> > any one know how can i do that?
> > by default, it is displayed 1 comma after the comma
>
> Did you read documentation [1] about that?
>
> [1] http://struts.apache.org/2.1.6/docs/formatting-dates-and-numbers.html
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Elyes.

Re: display Bigdecimal with 3 number after the ,

Posted by Lukasz Lenart <lu...@googlemail.com>.
2009/4/2 elyes sallem <el...@gmail.com>:
> Hello,
> i work with struts 1.2 and i wanna display in the jsp page Bigdecimal number
> with 3 number after the comma
> any one know how can i do that?
> by default, it is displayed 1 comma after the comma

Did you read documentation [1] about that?

[1] http://struts.apache.org/2.1.6/docs/formatting-dates-and-numbers.html


Regards
-- 
Lukasz
http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org