Styles
| ID | Name | Status | Comments | |
|---|---|---|---|---|
| 58696 | Sadipscing Invidunt | sadipscing-invidunt@sadipscing.com | NO | clita accusam... |
| 47149 | Sadipscing Amet | sadipscing-amet@gubergren.com | SED | ipsum ea... |
| 72748 | Sea Clita | sea-clita@vero.com | VOLUPTUA | sea ut... |
| 15562 | Amet Labore | amet-labore@sea.com | SIT | nonumy magna... |
| 16666 | Amet Eos | amet-eos@est.com | SED | sed tempor... |
| 54834 | Nonumy Et | nonumy-et@justo.com | EIRMOD | ut ipsum... |
| 40611 | Et Sanctus | et-sanctus@consetetur.com | LOREM | sea takimata... |
| 2845 | Eirmod Stet | eirmod-Stet@diam.com | LABORE | diam vero... |
| 82532 | Et Diam | et-diam@et.com | VERO | vero kasd... |
| 99199 | Takimata Nonumy | takimata-nonumy@dolores.com | MAGNA | diam clita... |
You actually have a lot of flexibility in how the table is displayed, but of course you should probably stay close to the defaults in most cases. You adjust the look of the table via two methods, 1) pass through table and column attributes, and 2) Style sheets which are described below.
Click through the above links to see different style examples of the same basic table. Most of the differences in appearance between the tables below are achieved via only stylesheet changes.
Html attributes
You can assign to the <display:table> tag any standard html attribute (es. cellspacing, cellpadding), and it will be included in the rendered table.
Likewise, you can assign to the <display:column> tag any standard html attribute and it will be included
in any <td> tag of the rendered table. You can also specify a class to be used only for the column
header (<th>) adding a
headerClass
attribute.
Note: the attribute
styleClass
used for the <table> and <column> tag in previous version of the taglibrary is deprecated in
favor of the standard html
class
attribute.
Style Sheets
While attributes might be the most comfortable way to change the appearance of your table, using style sheets is more powerful. We use style sheets to make the header a dark color, make rows an alternate color, and set the fonts within the cells to a smaller version of verdana. As the <display:table> tag is drawing, it assigns the following class names to elements.
You can then create a style sheet and assign attributes such as font size, family, color, etc... to each of those class names and the table will be shown according to your styles.
| class | assigned to |
|---|---|
| odd | assigned to the tr tag of all odd numbered data rows |
| even | assigned to the tr tag of all even numbered data rows |
| sorted | assigned to the th tag of the sorted column |
| order1 | assigned to the th tag of the sorted column if sort order is ascending |
| order2 | assigned to the th tag of the sorted column if sort order is descending |