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.
| money | email title |
|---|---|
| 7816.00 $ | dolor-At@clita.com |
| 3209.00 $ | et-erat@eos.com |
| 363.00 $ | est-labore@dolore.com |
| 6356.00 $ | sed-vero@takimata.com |
| 9789.00 $ | magna-diam@diam.com |
| 6211.00 $ | sanctus-eirmod@amet.com |
| 2429.00 $ | sanctus-Stet@sanctus.com |
| 4796.00 $ | takimata-est@justo.com |
| 6521.00 $ | et-accusam@sadipscing.com |
| 4922.00 $ | elitr-Stet@sea.com |