Displaytag supports easy display of formatted number columns using the format attribute on <display:column> - however, it’s not really well documented on the Displaytag site. Here’s how to do simple number formatting without requiring a decorator class:
<displaytag:column property="amount" title="$ Amount" format="{0,number,#.##}"/>
This will display a decimal formatted to a maximum of 2 decimal places!
No comments:
Post a Comment