This table lists all the configurable properties for the tag libraries. The default properties are
defined in the
TableTag.properties
file included in the library jar.
There are 2 ways to override default property settings:
Include in your custom properties file only the properties you need to change. If a property is not defined in the user file, the default from the TableTag.properties included in the jar is used.
Some properties contain messages you may wish to display according to the user Locale. To do that
first add a default
displaytag.properties
file where you set all the locale independent entries and default messages. Then you can add
localized properties file (for example
displaytag_IT.properties
).
| Property | Default | Valid Values | Description | Can be set using file/setProperty |
|---|---|---|---|---|
| basic.show.header | true | true, false | Indicates if you want the header to appear at the top of the table, the header contains the column names, and any additional action banners that might be required (like paging, export, etc...) | yes/yes |
| basic.empty.showtable | false | true, false | Indicates if you want the table to show up also if the list is empty | yes/yes |
| basic.msg.empty_list | Nothing found to display | Any string |
The message that is displayed if the list that this table is associated with is either
null, or empty. Used only if
basic.empty.showtable
is
false
.
| yes/yes |
| basic.msg.empty_list_row | <tr class="empty"><td colspan="{0}">Nothing found to display.</td></tr> | Any string |
The message that is displayed into the first table row if the list that this table is
associated with is either null, or empty. {0} is replaced with the total column number
to generate a correct colspan. Used only if
basic.empty.showtable
is
true
.
| yes/yes |
| sort.amount | page | page, list | Indicates if the full list should be sorted before paging or if the sorting only affects items in the current page. Default behaviour is to sort only items in the current page (first paging, then sorting). | yes/no |
| export.banner | <div class="exportlinks"> Export options: {0} </div> | Any string in a message format with 1 placeholder | Contains the string that is displayed in the table footer when the user indicates that they want to enable the export function. The placeholder is replaced with links to the various export formats that are support. | yes/yes |
| export.banner.sepchar | | | Any string | Used to separate the valid export type (typically would be a bar, a comma, or a dash). | yes/yes |
| paging.banner.placement | top | top, bottom, both | When the table tag has to show the header for paging through a long list, this option indicates where that header should be shown in relation to the table | yes/yes |
| paging.banner.item_name | item | Any string | What the various objects in the list being displayed should be referred to as (singular) | yes/yes |
| paging.banner.items_name | items | Any string | What the various objects in the list being displayed should be referred to as (plural) | yes/yes |
| paging.banner.no_items_found | <span class="pagebanner"> No {0} found. </span> | Any string in a message format with 1 placeholder | What is shown in the pagination header when no objects are available in the list to be displayed. The single placeholder is replaced with the name of the items in the list (plural) | yes/yes |
| paging.banner.one_item_found | <span class="pagebanner"> One {0} found. </span> | Any string in a message format with 1 placeholder | What is shown in the pagination header when one object is available in the list to be displayed. The single placeholder is replaced with the name of the items in the list (singular) | yes/yes |
| paging.banner.all_items_found | <span class="pagebanner"> {0} {1} found, displaying all {2}. </span> | Any string in a message format with 3 placeholders | What is shown in the pagination header when all the objects in the list are being shown. {0} and {2} are replaced with the number of objects in the list, {1} is replaced with the name of the items {plural} | yes/yes |
| paging.banner.some_items_found | <span class="pagebanner"> {0} {1} found, displaying {2} to {3}. </span> | Any string |
What is shown in the pagination header when a partial list of the objects in the
list are being shown. Parameters:
| yes/yes |
| paging.banner.group_size | 8 | Any reasonable number | The number of pages to show in the header that this person can instantly jump to | yes/yes |
| paging.banner.full | <span class="pagelinks"> [<a href="{1}">First</a>/ <a href="{2}">Prev</a>] {0} [ <a href="{3}">Next</a>/ <a href="{4}">Last </a>]</span> |
What is shown in the pagination bar when there are more pages and the selected page is
not the first or the last one. Parameters:
| yes/yes | |
| paging.banner.first | <span class="pagelinks"> [First/Prev] {0} [ <a href="{3}">Next</a>/ <a href="{4}">Last</a>] </span> |
What is shown in the pagination bar when the first page is being shown. Placeholders are
the same as for
paging.banner.full
.
| yes/yes | |
| paging.banner.last | <span class="pagelinks">[ <a href="{1}">First</a>/ <a href="{2}">Prev</a>] {0} [Next/Last] </span> |
What is shown in the pagination bar when the last page is being shown. Placeholders are
the same as for
paging.banner.full
.
| yes/yes | |
| paging.banner.onepage | <span class="pagelinks">{0}</span> |
What is shown in the pagination bar when only one page is returned. Placeholders are the
same as for
paging.banner.full
.
| yes/yes | |
| paging.banner.page.selected | <strong>{0}</strong> | selected page. {0} is replaced with the page number, {1} with the page url. | yes/yes | |
| paging.banner. page.link | <a href="{1}" title="Go to page {0}">{0}</a> | link to a page. {0} is replaced with the page number, {1} with the page url. | yes/yes | |
| paging.banner.page.separator | , | separator between pages | yes/yes | |
| factory.requestHelper | org.displaytag.util.DefaultRequestHelperFactory | Class name for a valid RequestHelperFactory implementation | RequestHelperFactory to be used. You can replace the default one if you need to generate links with a different format (for example in portal applications). | yes/no |
Displaytag supports exporting to excel, csv, and xml formats. Some configurable properties are specific for one of these format. Replace " {export name} " in the property name with "excel", "csv" or "xml". Some of the properties won't work in any export format.
| Property | Default | Valid Values | Description | Can be set using file/setProperty |
|---|---|---|---|---|
| export.types | csv excel xml pdf | whitespace separated list of configured export types | Holds the list of configured export types. | yes/no |
| export. {export name} | true | true, false | Should the tag present the option to export data in this specific format. | yes/yes |
| export. {export name}.class |
Any valid class which implements the
org.displaytag.export.ExportView
interface
| Fully qualified class name for the class which will be used for exporting. | yes/no | |
| export. {export name}.label | <span class="export {export name} "> {export name} </span> | Any string | The label on the link that the user clicks on to export the data in a specific format. | yes/yes |
| export. {export name}.include_header | false | true, false | If set to true, the first line of the export will contain column titles as displayed on the HTML page. The header by default is not included in when exporting. | yes/yes |
| export. {export name}.filename | none | any valid file name | When saving exported files the user will be prompted to use this file name. | yes/yes |
| export.amount | list | page, list | Indicates how much data should be sent down to the user when they ask for a data export. By default, it sends the entire list. But, you can instruct the table tag to only send down the data that is currently being shown on the page | yes/yes |
| export.decorated | true | true, false | Should the data be "decorated" as it is exported. The default value is true, but you might want to turn off any decoration that is for example HTML specific when exporting the data. | yes/yes |
| Property | Default | Valid Values | Description | Can be set using file/setProperty |
|---|---|---|---|---|
| css.tr.even | even | any valid css class name | css class automatically added to even rows | yes/yes |
| css.tr.odd | odd | any valid css class name | css class automatically added to odd rows | yes/yes |
| css.th.sorted | sorted | any valid css class name | css class automatically added to the header of sorted columns | yes/yes |
| css.th.ascending | order1 | any valid css class name | css class automatically added to the header of a column sorted is ascending order | yes/yes |
| css.th.descending | order2 | any valid css class name | css class automatically added to the header of a column sorted is descending order | yes/yes |
| css.table | none | any valid css class name | css class automatically added to the main table tag | yes/yes |
| css.th.sortable | none | any valid css class name | css class automatically added to any sortable column | yes/yes |