struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ashwin ala <>
Subject RE: Formatting in extended theme using Freemarker
Date Sat, 12 Sep 2009 18:30:52 GMT
Thank you for the prompt replies.
The BigDecimal rounding somehow always renders the value with extra zeroes
I had some success with the freemarker number formatting as suggested by
Martin and am getting close to solving this. I changed text.ftl to now use
this line:
<#if parameters.nameValue??><#setting number_format="#.00">
 value="< value="${parameters.nameValue?number}"/>"<#rt/>

However it still doesnt render the final 0. For example value "5" should
render as "5.00" but renders as "5.0"  Ive tried number_format="#.##" as
well as other combinations with no success.

I'll keep trying different approaches. Please let me know if you can suggest
a solution.


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