Using format

ID Email Date Money
95675 email is sea-dolores@dolores.com 03-02-2009 7,750.00 $
70206 email is sanctus-Lorem@clita.com 09-09-2010 1,595.00 $
50410 email is dolores-labore@clita.com 28-09-2009 8,797.00 $
12013 email is ipsum-clita@sadipscing.com 25-05-2009 8,422.00 $
96762 email is rebum-sadipscing@sanctus.com 25-02-2009 9,096.00 $
16135 email is ut-nonumy@takimata.com 07-04-2010 6,712.00 $
87457 email is invidunt-sit@sed.com 02-09-2009 0,250.00 $
61926 email is tempor-sed@et.com 16-09-2010 4,671.00 $
61490 email is dolor-dolor@kasd.com 24-03-2009 2,093.00 $
45279 email is et-kasd@duo.com 21-09-2009 9,221.00 $


You can use any valid java.text.MessageFormat pattern in the format attribute. Sorting will be based on the original object, not on the formatted String.

Note that errors due to an invalid pattern/object combination (for example trying to format a String like a number) will not be rethrown. Instead, an error log will be written and the original unformatted object displayed.

You can also use a format pattern along with column decorators (the pattern will be applied after the decoration).

  <display:table name="test">
    <display:column property="id" title="ID" />
    <display:column property="email" format="email is {0}" />
    <display:column property="date" format="{0,date,dd-MM-yyyy}" sortable="true"/>
    <display:column property="money" format="{0,number,0,000.00} $" sortable="true"/>
  </display:table>