Re: Asking about BigDecimal in Struts 2

2010-12-07 Thread Burton Rhodes
I always just used the following to display my BigDecimal values... s:property value=%{getText('format.money',{xaction.listPrice != null ? xaction.listPrice :''})} / package.properties file: format.money = {0,number,\u00A4###,##0} On Mon, Dec 6, 2010 at 9:29 PM, Yanto Bong yantob...@gmail.com

Re: Asking about BigDecimal in Struts 2

2010-12-07 Thread Li Ying
I hate MS SQL Server~ 2010/12/7 Yanto Bong yantob...@gmail.com: Hi Mead, thanks for the suggestion, but we want to keep the minimum changes on the code. if we convert into string in jsp/view pages, there are quite a lot of changes. however we already change our formatting script in our

Re: Asking about BigDecimal in Struts 2

2010-12-06 Thread Yanto Bong
Hi Li, thanks...unfortunately we already use this model in many places and we need to have BigDecimal return datetype. However we already solve this issue by changing our java script lib. Thanks On Mon, Dec 6, 2010 at 11:47 AM, Li Ying liying.cn.2...@gmail.com wrote: This looks like the

Re: Asking about BigDecimal in Struts 2

2010-12-06 Thread Mead Lai
Hello, 1,convert the munber into string in the jsp/view page. 2,write a JSTL to render that dataType by your self. Regards, Mead On Tue, Dec 7, 2010 at 10:25 AM, Yanto Bong yantob...@gmail.com wrote: Hi Li, thanks...unfortunately we already use this model in many places and we need to

Re: Asking about BigDecimal in Struts 2

2010-12-06 Thread Yanto Bong
Hi Mead, thanks for the suggestion, but we want to keep the minimum changes on the code. if we convert into string in jsp/view pages, there are quite a lot of changes. however we already change our formatting script in our js library and it solved the issue. also this issue just happend when we

Asking about BigDecimal in Struts 2

2010-12-05 Thread Yanto Bong
Hi All, We've using BigDecimal as datatype in hibernate and model for Numeric (20,8) datatype in database. however when we display it in JSP using struts 2, if the value 0 then it will display correctly. However if the value is 0. in database, then it will display in JSP it will shown as

Re: Asking about BigDecimal in Struts 2

2010-12-05 Thread Li Ying
This looks like the result of toString() of BigDecimal. May be you can try this: http://download.oracle.com/javase/1.5.0/docs/api/java/math/BigDecimal.html#toPlainString%28%29 2010/12/6 Yanto Bong yantob...@gmail.com: Hi All, We've using BigDecimal as datatype in hibernate and model for