Configuration properties

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:

  • For the whole web application, create a custom properties file named "displaytag.properties" and place it in the application classpath. Displaytag will use the locale of the request object to determine the locale of the property file to use; if the key required does not exist in the specified file, the key will be loaded from a more general property file.
  • For a single table instance, using the <display:setProperty> tag

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.

I18n

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 ).

Generic

PropertyDefaultValid ValuesDescriptionCan be set using file/setProperty
basic.show.headertruetrue, 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.showtablefalsetrue, falseIndicates if you want the table to show up also if the list is emptyyes/yes
basic.msg.empty_listNothing found to displayAny 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.amountpagepage, 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.placementtoptop, 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_nameitemAny string What the various objects in the list being displayed should be referred to as (singular) yes/yes
paging.banner.items_nameitemsAny 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:
  • {0}: total number of objects in the list
  • {1}: name of the items (plural)
  • {2}: start index of the objects being shown
  • {3}: end index of the objects being shown
  • {4}: current page
  • {5}: total number of pages
yes/yes
paging.banner.group_size8Any reasonable numberThe number of pages to show in the header that this person can instantly jump toyes/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:
  • {0}: numbered pages list
  • {1}: link to the first page
  • {2}: link to the previous page
  • {3}: link to the next page
  • {4}: link to the last page
  • {5}: current page
  • {6}: total number of pages
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 pagesyes/yes
factory.requestHelperorg.displaytag.util.DefaultRequestHelperFactoryClass 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

Exporting

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.

PropertyDefaultValid ValuesDescriptionCan be set using file/setProperty
export.typescsv excel xml pdfwhitespace separated list of configured export typesHolds the list of configured export types.yes/no
export. {export name} truetrue, falseShould 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 falsetrue, 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 nameWhen saving exported files the user will be prompted to use this file name.yes/yes
export.amountlistpage, 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.decoratedtruetrue, 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

css

PropertyDefaultValid ValuesDescriptionCan be set using file/setProperty
css.tr.evenevenany valid css class namecss class automatically added to even rowsyes/yes
css.tr.oddoddany valid css class namecss class automatically added to odd rowsyes/yes
css.th.sortedsortedany valid css class namecss class automatically added to the header of sorted columnsyes/yes
css.th.ascendingorder1any valid css class namecss class automatically added to the header of a column sorted is ascending orderyes/yes
css.th.descendingorder2any valid css class namecss class automatically added to the header of a column sorted is descending orderyes/yes
css.table none any valid css class namecss class automatically added to the main table tagyes/yes
css.th.sortable none any valid css class namecss class automatically added to any sortable columnyes/yes