Using predefined column lists

This example shows how a predefined set of columns can be applied to a table.

All you have to do is feeding the table with a list of beans/Maps which contains the needed column attributes and create the needed <display:column> tags and use a simple iteration directly in the jsp

In this page we create three different set of colums, implemented as Lists of Maps, directly in the jsp. Obviously, you will probably want to configure them in a db, xml file, or any other source for a real use (Spring xml files could be an easy and flexible solution). No dipendence on displaytag-specific classes is required in your application, since you can simply use a plain Map or implement a custom bean.

Click on a column set below to see it applied to the table.





email title date money
sed-et@consetetur.com Sat Mar 20 18:13:10 CET 2010 5768.00 $
diam-sit@labore.com Sun Sep 26 18:13:10 CEST 2010 2663.00 $
eirmod-dolor@gubergren.com Fri Jul 17 18:13:10 CEST 2009 011.00 $
et-sadipscing@invidunt.com Fri Jun 11 18:13:10 CEST 2010 9205.00 $
eirmod-Stet@est.com Sat Jan 31 18:13:10 CET 2009 7778.00 $
no-ipsum@voluptua.com Wed Apr 29 18:13:10 CEST 2009 6337.00 $
gubergren-diam@tempor.com Thu Apr 15 18:13:10 CEST 2010 7475.00 $
elitr-eirmod@et.com Thu Dec 04 18:13:10 CET 2008 5020.00 $
clita-takimata@elitr.com Wed Mar 17 18:13:10 CET 2010 1565.00 $
eirmod-nonumy@consetetur.com Fri Oct 02 18:13:10 CEST 2009 6763.00 $