opensubscriber
   Find in this group all groups
 
Unknown more information…

u : user@struts.apache.org 13 September 2009 • 2:30AM -0400

RE: Formatting in extended theme using Freemarker
by ashwin ala

REPLY TO AUTHOR
 
REPLY TO GROUP




Thank you for the prompt replies.
The BigDecimal rounding somehow always renders the value with extra zeroes
appended.
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="<@s.property value="${parameters.nameValue?number}"/>"<#rt/>
</#if>

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.

thanks
ash.

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.