org.displaytag.properties
Class TableProperties

java.lang.Object
  extended by org.displaytag.properties.TableProperties
All Implemented Interfaces:
java.lang.Cloneable

public final class TableProperties
extends java.lang.Object
implements java.lang.Cloneable

The properties used by the Table tags. The properties are loaded in the following order, in increasing order of priority. The locale of getInstance() is used 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.

  1. First, from the TableTag.properties included with the DisplayTag distribution.
  2. Then, from the file displaytag.properties, if it is present; these properties are intended to be set by the user for sitewide application. Messages are gathered according to the Locale of the property file.
  3. Finally, if this class has a userProperties defined, all of the properties from that Properties object are copied in as well.

Version:
$Revision: 1096 $ ($Author: rapruitt $)
Author:
Fabrizio Giustina, rapruitt

Field Summary
static java.lang.String DEFAULT_FILENAME
          name of the default properties file name ("displaytag.properties").
static java.lang.String EXPORTPROPERTY_BOOLEAN_EXPORTHEADER
          export property include_header.
static java.lang.String EXPORTPROPERTY_STRING_CLASS
          export property class.
static java.lang.String EXPORTPROPERTY_STRING_FILENAME
          export property filename.
static java.lang.String EXPORTPROPERTY_STRING_LABEL
          export property label.
static java.lang.String LOCAL_PROPERTIES
          The name of the local properties file that is searched for on the classpath.
static java.lang.String PROPERTY_BOOLEAN_EMPTYLIST_SHOWTABLE
          property basic.empty.showtable.
static java.lang.String PROPERTY_BOOLEAN_EXPORTDECORATED
          property export.decorated.
static java.lang.String PROPERTY_BOOLEAN_PAGINATION_SKIP_PAGE_NUMBER_IN_SORT
          Property pagination.sort.skippagenumber.
static java.lang.String PROPERTY_BOOLEAN_SHOWHEADER
          property basic.show.header.
static java.lang.String PROPERTY_CLASS_DECORATORFACTORY
          property factory.decorators.
static java.lang.String PROPERTY_CLASS_LOCALEPROVIDER
          property locale.provider.
static java.lang.String PROPERTY_CLASS_LOCALERESOLVER
          property locale.resolver.
static java.lang.String PROPERTY_CLASS_REQUESTHELPERFACTORY
          property factory.requestHelper.
static java.lang.String PROPERTY_CSS_TABLE
          property css.table: holds the name of the css class added to the main table tag.
static java.lang.String PROPERTY_CSS_TH_SORTABLE
          property css.th.sortable: holds the name of the css class added to the the header of a sortable column.
static java.lang.String PROPERTY_CSS_TH_SORTED
          property css.th.sorted: holds the name of the css class added to the the header of a sorted column.
static java.lang.String PROPERTY_CSS_TH_SORTED_ASCENDING
          property css.th.ascending: holds the name of the css class added to the the header of a column sorted in ascending order.
static java.lang.String PROPERTY_CSS_TH_SORTED_DESCENDING
          property css.th.descending: holds the name of the css class added to the the header of a column sorted in descending order.
static java.lang.String PROPERTY_CSS_TR_EVEN
          property css.tr.even: holds the name of the css class for even rows.
static java.lang.String PROPERTY_CSS_TR_ODD
          property css.tr.odd: holds the name of the css class for odd rows.
static java.lang.String PROPERTY_DECORATOR_MEDIA
          used to set the media decorator property name.
static java.lang.String PROPERTY_DECORATOR_SUFFIX
          prefix used to set the media decorator property name.
static java.lang.String PROPERTY_DEFAULT_COMPARATOR
          Property comparator.default.
static java.lang.String PROPERTY_EXPORT_PREFIX
          prefix used for all the properties related to export ("export").
static java.lang.String PROPERTY_EXPORTTYPES
          property export.types: holds the list of export available export types.
static java.lang.String PROPERTY_INT_PAGING_GROUPSIZE
          property paging.banner.group_size.
static java.lang.String PROPERTY_STRING_BANNER_PLACEMENT
          property paging.banner.placement.
static java.lang.String PROPERTY_STRING_EMPTYLIST_MESSAGE
          property basic.msg.empty_list.
static java.lang.String PROPERTY_STRING_EMPTYLISTROW_MESSAGE
          property basic.msg.empty_list_row.
static java.lang.String PROPERTY_STRING_EXPORTAMOUNT
          property export.amount.
static java.lang.String PROPERTY_STRING_EXPORTBANNER
          property export.banner.
static java.lang.String PROPERTY_STRING_EXPORTBANNER_SEPARATOR
          property export.banner.sepchar.
static java.lang.String PROPERTY_STRING_PAGINATION_ASC_VALUE
          Property pagination.sort.asc.value.
static java.lang.String PROPERTY_STRING_PAGINATION_DESC_VALUE
          Property pagination.sort.desc.value.
static java.lang.String PROPERTY_STRING_PAGINATION_PAGE_NUMBER_PARAM
          Property pagination.pagenumber.param.
static java.lang.String PROPERTY_STRING_PAGINATION_SEARCH_ID_PARAM
          Property pagination.searchid.param.
static java.lang.String PROPERTY_STRING_PAGINATION_SORT_DIRECTION_PARAM
          Property pagination.sortdirection.param.
static java.lang.String PROPERTY_STRING_PAGINATION_SORT_PARAM
          Property pagination.sort.param.
static java.lang.String PROPERTY_STRING_PAGING_BANNER_FIRST
          property paging.banner.first.
static java.lang.String PROPERTY_STRING_PAGING_BANNER_FULL
          property paging.banner.full.
static java.lang.String PROPERTY_STRING_PAGING_BANNER_LAST
          property paging.banner.last.
static java.lang.String PROPERTY_STRING_PAGING_BANNER_ONEPAGE
          property paging.banner.onepage.
static java.lang.String PROPERTY_STRING_PAGING_FOUND_ALLITEMS
          property paging.banner.all_items_found.
static java.lang.String PROPERTY_STRING_PAGING_FOUND_ONEITEM
          property paging.banner.one_item_found.
static java.lang.String PROPERTY_STRING_PAGING_FOUND_SOMEITEMS
          property paging.banner.some_items_found.
static java.lang.String PROPERTY_STRING_PAGING_INVALIDPAGE
          property error.msg.invalid_page.
static java.lang.String PROPERTY_STRING_PAGING_ITEM_NAME
          property paging.banner.item_name.
static java.lang.String PROPERTY_STRING_PAGING_ITEMS_NAME
          property paging.banner.items_name.
static java.lang.String PROPERTY_STRING_PAGING_NOITEMS
          property paging.banner.no_items_found.
static java.lang.String PROPERTY_STRING_PAGING_PAGE_LINK
          property paging.banner.page.link.
static java.lang.String PROPERTY_STRING_PAGING_PAGE_SELECTED
          property paging.banner.page.selected.
static java.lang.String PROPERTY_STRING_PAGING_PAGE_SPARATOR
          property paging.banner.page.separator.
static java.lang.String PROPERTY_STRING_SORTAMOUNT
          property sort.amount.
 
Method Summary
static void clearProperties()
          Unload all cached properties.
protected  java.lang.Object clone()
          Clones the properties as well.
 I18nResourceProvider geResourceProvider()
          Returns the configured resource provider instance.
 boolean getAddExport(MediaTypeEnum exportType)
          Is the given export option enabled?
 boolean getAddPagingBannerBottom()
          Should paging banner be added after the table?
 boolean getAddPagingBannerTop()
          Should paging banner be added before the table?
 java.lang.String getCssOrder(boolean ascending)
          Returns the appropriate css class for a sorted column header.
 java.lang.String getCssRow(int rowNumber)
          Returns the appropriate css class for a table row.
 java.lang.String getCssSortable()
          Returns the configured css class for a sortable column header.
 java.lang.String getCssSorted()
          Returns the configured css class for a sorted column header.
 java.lang.String getCssTable()
          Returns the configured css class for the main table tag.
 DecoratorFactory getDecoratorFactoryInstance()
          Returns an instance of configured DecoratorFactory.
 java.util.Comparator getDefaultComparator()
           
 java.lang.String getEmptyListMessage()
          Getter for the PROPERTY_STRING_EMPTYLIST_MESSAGE property.
 java.lang.String getEmptyListRowMessage()
          Getter for the PROPERTY_STRING_EMPTYLISTROW_MESSAGE property.
 boolean getEmptyListShowTable()
          Getter for the PROPERTY_BOOLEAN_EMPTYLIST_SHOWTABLE property.
 java.lang.String getExportBanner()
          Getter for the PROPERTY_STRING_EXPORTBANNER property.
 java.lang.String getExportBannerSeparator()
          Getter for the PROPERTY_STRING_EXPORTBANNER_SEPARATOR property.
 java.lang.String getExportClass(java.lang.String exportName)
          Returns the class responsible for the given export.
 boolean getExportDecorated()
          Getter for the PROPERTY_BOOLEAN_EXPORTDECORATED property.
 java.lang.String getExportDecoratorName(MediaTypeEnum thatEnum)
          Deprecated. Use getMediaTypeDecoratorName instead.
 java.lang.String getExportFileName(MediaTypeEnum exportType)
          Returns the file name for the given media.
 boolean getExportFullList()
          Getter for the PROPERTY_STRING_EXPORTAMOUNT property.
 boolean getExportHeader(MediaTypeEnum exportType)
          Should headers be included in given export type?
 java.lang.String getExportLabel(MediaTypeEnum exportType)
          Returns the label for the given export option.
 java.lang.String[] getExportTypes()
          Returns the configured list of media.
static TableProperties getInstance(javax.servlet.http.HttpServletRequest request)
          Returns a new TableProperties instance for the given locale.
 java.util.Locale getLocale()
          The locale for which these properties are intended.
static LocaleResolver getLocaleResolverInstance()
          Returns the configured Locale Resolver.
 java.lang.String getMediaTypeDecoratorName(MediaTypeEnum thatEnum)
          Obtain the name of the decorator configured for a given media type.
 java.lang.String getPaginationAscValue()
           
 java.lang.String getPaginationDescValue()
           
 java.lang.String getPaginationPageNumberParam()
           
 java.lang.String getPaginationSearchIdParam()
           
 boolean getPaginationSkipPageNumberInSort()
           
 java.lang.String getPaginationSortDirectionParam()
           
 java.lang.String getPaginationSortParam()
           
 java.lang.String getPagingBannerFirst()
          Getter for the PROPERTY_STRING_PAGING_BANNER_FIRST property.
 java.lang.String getPagingBannerFull()
          Getter for the PROPERTY_STRING_PAGING_BANNER_FULL property.
 java.lang.String getPagingBannerLast()
          Getter for the PROPERTY_STRING_PAGING_BANNER_LAST property.
 java.lang.String getPagingBannerOnePage()
          Getter for the PROPERTY_STRING_PAGING_BANNER_ONEPAGE property.
 java.lang.String getPagingFoundAllItems()
          Getter for the PROPERTY_STRING_PAGING_FOUND_ALLITEMS property.
 java.lang.String getPagingFoundNoItems()
          Getter for the PROPERTY_STRING_PAGING_NOITEMS property.
 java.lang.String getPagingFoundOneItem()
          Getter for the PROPERTY_STRING_PAGING_FOUND_ONEITEM property.
 java.lang.String getPagingFoundSomeItems()
          Getter for the PROPERTY_STRING_PAGING_FOUND_SOMEITEMS property.
 int getPagingGroupSize()
          Getter for the PROPERTY_INT_PAGING_GROUPSIZE property.
 java.lang.String getPagingInvalidPage()
          Getter for the PROPERTY_STRING_PAGING_INVALIDPAGE property.
 java.lang.String getPagingItemName()
          Getter for the PROPERTY_STRING_PAGING_ITEM_NAME property.
 java.lang.String getPagingItemsName()
          Getter for the PROPERTY_STRING_PAGING_ITEMS_NAME property.
 java.lang.String getPagingPageLink()
          Getter for the PROPERTY_STRING_PAGING_PAGE_LINK property.
 java.lang.String getPagingPageSelected()
          Getter for the PROPERTY_STRING_PAGING_PAGE_SELECTED property.
 java.lang.String getPagingPageSeparator()
          Getter for the PROPERTY_STRING_PAGING_PAGE_SPARATOR property.
 RequestHelperFactory getRequestHelperFactoryInstance()
          Returns an instance of configured requestHelperFactory.
 boolean getShowHeader()
          Getter for the PROPERTY_BOOLEAN_SHOWHEADER property.
 boolean getSortFullList()
          Getter for the PROPERTY_STRING_SORTAMOUNT property.
protected static void setLocaleResolver(LocaleResolver resolver)
          Setter for LocaleResolver.
 void setProperty(java.lang.String key, java.lang.String value)
          Sets a property.
protected static void setResourceProvider(I18nResourceProvider provider)
          Setter for I18nResourceProvider.
static void setUserProperties(java.util.Properties overrideProperties)
          Local, non-default properties; these settings override the defaults from displaytag.properties and TableTag.properties.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FILENAME

public static final java.lang.String DEFAULT_FILENAME
name of the default properties file name ("displaytag.properties").

See Also:
Constant Field Values

LOCAL_PROPERTIES

public static final java.lang.String LOCAL_PROPERTIES
The name of the local properties file that is searched for on the classpath. Settings in this file will override the defaults loaded from TableTag.properties.

See Also:
Constant Field Values

PROPERTY_STRING_EXPORTBANNER

public static final java.lang.String PROPERTY_STRING_EXPORTBANNER
property export.banner.

See Also:
Constant Field Values

PROPERTY_STRING_EXPORTBANNER_SEPARATOR

public static final java.lang.String PROPERTY_STRING_EXPORTBANNER_SEPARATOR
property export.banner.sepchar.

See Also:
Constant Field Values

PROPERTY_BOOLEAN_EXPORTDECORATED

public static final java.lang.String PROPERTY_BOOLEAN_EXPORTDECORATED
property export.decorated.

See Also:
Constant Field Values

PROPERTY_STRING_EXPORTAMOUNT

public static final java.lang.String PROPERTY_STRING_EXPORTAMOUNT
property export.amount.

See Also:
Constant Field Values

PROPERTY_STRING_SORTAMOUNT

public static final java.lang.String PROPERTY_STRING_SORTAMOUNT
property sort.amount.

See Also:
Constant Field Values

PROPERTY_BOOLEAN_SHOWHEADER

public static final java.lang.String PROPERTY_BOOLEAN_SHOWHEADER
property basic.show.header.

See Also:
Constant Field Values

PROPERTY_STRING_EMPTYLIST_MESSAGE

public static final java.lang.String PROPERTY_STRING_EMPTYLIST_MESSAGE
property basic.msg.empty_list.

See Also:
Constant Field Values

PROPERTY_STRING_EMPTYLISTROW_MESSAGE

public static final java.lang.String PROPERTY_STRING_EMPTYLISTROW_MESSAGE
property basic.msg.empty_list_row.

See Also:
Constant Field Values

PROPERTY_BOOLEAN_EMPTYLIST_SHOWTABLE

public static final java.lang.String PROPERTY_BOOLEAN_EMPTYLIST_SHOWTABLE
property basic.empty.showtable.

See Also:
Constant Field Values

PROPERTY_STRING_BANNER_PLACEMENT

public static final java.lang.String PROPERTY_STRING_BANNER_PLACEMENT
property paging.banner.placement.

See Also:
Constant Field Values

PROPERTY_STRING_PAGING_INVALIDPAGE

public static final java.lang.String PROPERTY_STRING_PAGING_INVALIDPAGE
property error.msg.invalid_page.

See Also:
Constant Field Values

PROPERTY_STRING_PAGING_ITEM_NAME

public static final java.lang.String PROPERTY_STRING_PAGING_ITEM_NAME
property paging.banner.item_name.

See Also:
Constant Field Values

PROPERTY_STRING_PAGING_ITEMS_NAME

public static final java.lang.String PROPERTY_STRING_PAGING_ITEMS_NAME
property paging.banner.items_name.

See Also:
Constant Field Values

PROPERTY_STRING_PAGING_NOITEMS

public static final java.lang.String PROPERTY_STRING_PAGING_NOITEMS
property paging.banner.no_items_found.

See Also:
Constant Field Values

PROPERTY_STRING_PAGING_FOUND_ONEITEM

public static final java.lang.String PROPERTY_STRING_PAGING_FOUND_ONEITEM
property paging.banner.one_item_found.

See Also:
Constant Field Values

PROPERTY_STRING_PAGING_FOUND_ALLITEMS

public static final java.lang.String PROPERTY_STRING_PAGING_FOUND_ALLITEMS
property paging.banner.all_items_found.

See Also:
Constant Field Values

PROPERTY_STRING_PAGING_FOUND_SOMEITEMS

public static final java.lang.String PROPERTY_STRING_PAGING_FOUND_SOMEITEMS
property paging.banner.some_items_found.

See Also:
Constant Field Values

PROPERTY_INT_PAGING_GROUPSIZE

public static final java.lang.String PROPERTY_INT_PAGING_GROUPSIZE
property paging.banner.group_size.

See Also:
Constant Field Values

PROPERTY_STRING_PAGING_BANNER_ONEPAGE

public static final java.lang.String PROPERTY_STRING_PAGING_BANNER_ONEPAGE
property paging.banner.onepage.

See Also:
Constant Field Values

PROPERTY_STRING_PAGING_BANNER_FIRST

public static final java.lang.String PROPERTY_STRING_PAGING_BANNER_FIRST
property paging.banner.first.

See Also:
Constant Field Values

PROPERTY_STRING_PAGING_BANNER_LAST

public static final java.lang.String PROPERTY_STRING_PAGING_BANNER_LAST
property paging.banner.last.

See Also:
Constant Field Values

PROPERTY_STRING_PAGING_BANNER_FULL

public static final java.lang.String PROPERTY_STRING_PAGING_BANNER_FULL
property paging.banner.full.

See Also:
Constant Field Values

PROPERTY_STRING_PAGING_PAGE_LINK

public static final java.lang.String PROPERTY_STRING_PAGING_PAGE_LINK
property paging.banner.page.link.

See Also:
Constant Field Values

PROPERTY_STRING_PAGING_PAGE_SELECTED

public static final java.lang.String PROPERTY_STRING_PAGING_PAGE_SELECTED
property paging.banner.page.selected.

See Also:
Constant Field Values

PROPERTY_STRING_PAGING_PAGE_SPARATOR

public static final java.lang.String PROPERTY_STRING_PAGING_PAGE_SPARATOR
property paging.banner.page.separator.

See Also:
Constant Field Values

PROPERTY_CLASS_REQUESTHELPERFACTORY

public static final java.lang.String PROPERTY_CLASS_REQUESTHELPERFACTORY
property factory.requestHelper.

See Also:
Constant Field Values

PROPERTY_CLASS_DECORATORFACTORY

public static final java.lang.String PROPERTY_CLASS_DECORATORFACTORY
property factory.decorators.

See Also:
Constant Field Values

PROPERTY_CLASS_LOCALEPROVIDER

public static final java.lang.String PROPERTY_CLASS_LOCALEPROVIDER
property locale.provider.

See Also:
Constant Field Values

PROPERTY_CLASS_LOCALERESOLVER

public static final java.lang.String PROPERTY_CLASS_LOCALERESOLVER
property locale.resolver.

See Also:
Constant Field Values

PROPERTY_CSS_TR_EVEN

public static final java.lang.String PROPERTY_CSS_TR_EVEN
property css.tr.even: holds the name of the css class for even rows. Defaults to even.

See Also:
Constant Field Values

PROPERTY_CSS_TR_ODD

public static final java.lang.String PROPERTY_CSS_TR_ODD
property css.tr.odd: holds the name of the css class for odd rows. Defaults to odd.

See Also:
Constant Field Values

PROPERTY_CSS_TABLE

public static final java.lang.String PROPERTY_CSS_TABLE
property css.table: holds the name of the css class added to the main table tag. By default no css class is added.

See Also:
Constant Field Values

PROPERTY_CSS_TH_SORTABLE

public static final java.lang.String PROPERTY_CSS_TH_SORTABLE
property css.th.sortable: holds the name of the css class added to the the header of a sortable column. By default no css class is added.

See Also:
Constant Field Values

PROPERTY_CSS_TH_SORTED

public static final java.lang.String PROPERTY_CSS_TH_SORTED
property css.th.sorted: holds the name of the css class added to the the header of a sorted column. Defaults to sorted.

See Also:
Constant Field Values

PROPERTY_CSS_TH_SORTED_ASCENDING

public static final java.lang.String PROPERTY_CSS_TH_SORTED_ASCENDING
property css.th.ascending: holds the name of the css class added to the the header of a column sorted in ascending order. Defaults to order1.

See Also:
Constant Field Values

PROPERTY_CSS_TH_SORTED_DESCENDING

public static final java.lang.String PROPERTY_CSS_TH_SORTED_DESCENDING
property css.th.descending: holds the name of the css class added to the the header of a column sorted in descending order. Defaults to order2.

See Also:
Constant Field Values

PROPERTY_EXPORT_PREFIX

public static final java.lang.String PROPERTY_EXPORT_PREFIX
prefix used for all the properties related to export ("export"). The full property name is export. [export type].[property name]

See Also:
Constant Field Values

PROPERTY_DECORATOR_SUFFIX

public static final java.lang.String PROPERTY_DECORATOR_SUFFIX
prefix used to set the media decorator property name. The full property name is decorator.media.[export type].

See Also:
Constant Field Values

PROPERTY_DECORATOR_MEDIA

public static final java.lang.String PROPERTY_DECORATOR_MEDIA
used to set the media decorator property name. The full property name is decorator.media.[export type]

See Also:
Constant Field Values

PROPERTY_EXPORTTYPES

public static final java.lang.String PROPERTY_EXPORTTYPES
property export.types: holds the list of export available export types.

See Also:
Constant Field Values

EXPORTPROPERTY_STRING_LABEL

public static final java.lang.String EXPORTPROPERTY_STRING_LABEL
export property label.

See Also:
Constant Field Values

EXPORTPROPERTY_STRING_CLASS

public static final java.lang.String EXPORTPROPERTY_STRING_CLASS
export property class.

See Also:
Constant Field Values

EXPORTPROPERTY_BOOLEAN_EXPORTHEADER

public static final java.lang.String EXPORTPROPERTY_BOOLEAN_EXPORTHEADER
export property include_header.

See Also:
Constant Field Values

EXPORTPROPERTY_STRING_FILENAME

public static final java.lang.String EXPORTPROPERTY_STRING_FILENAME
export property filename.

See Also:
Constant Field Values

PROPERTY_STRING_PAGINATION_SORT_PARAM

public static final java.lang.String PROPERTY_STRING_PAGINATION_SORT_PARAM
Property pagination.sort.param. If external pagination and sorting is used, it holds the name of the parameter used to hold the sort criterion in generated links

See Also:
Constant Field Values

PROPERTY_STRING_PAGINATION_SORT_DIRECTION_PARAM

public static final java.lang.String PROPERTY_STRING_PAGINATION_SORT_DIRECTION_PARAM
Property pagination.sortdirection.param. If external pagination and sorting is used, it holds the name of the parameter used to hold the sort direction in generated links (asc or desc)

See Also:
Constant Field Values

PROPERTY_STRING_PAGINATION_PAGE_NUMBER_PARAM

public static final java.lang.String PROPERTY_STRING_PAGINATION_PAGE_NUMBER_PARAM
Property pagination.pagenumber.param. If external pagination and sorting is used, it holds the name of the parameter used to hold the page number in generated links

See Also:
Constant Field Values

PROPERTY_STRING_PAGINATION_SEARCH_ID_PARAM

public static final java.lang.String PROPERTY_STRING_PAGINATION_SEARCH_ID_PARAM
Property pagination.searchid.param. If external pagination and sorting is used, it holds the name of the parameter used to hold the search ID in generated links

See Also:
Constant Field Values

PROPERTY_STRING_PAGINATION_ASC_VALUE

public static final java.lang.String PROPERTY_STRING_PAGINATION_ASC_VALUE
Property pagination.sort.asc.value. If external pagination and sorting is used, it holds the value of the parameter of the sort direction parameter for "ascending"

See Also:
Constant Field Values

PROPERTY_STRING_PAGINATION_DESC_VALUE

public static final java.lang.String PROPERTY_STRING_PAGINATION_DESC_VALUE
Property pagination.sort.desc.value. If external pagination and sorting is used, it holds the value of the parameter of the sort direction parameter for "descending"

See Also:
Constant Field Values

PROPERTY_BOOLEAN_PAGINATION_SKIP_PAGE_NUMBER_IN_SORT

public static final java.lang.String PROPERTY_BOOLEAN_PAGINATION_SKIP_PAGE_NUMBER_IN_SORT
Property pagination.sort.skippagenumber. If external pagination and sorting is used, it determines if the current page number must be added in sort links or not. If this property is true, it means that each click on a generated sort link will re-sort the list, and go back to the default page number. If it is false, each click on a generated sort link will re-sort the list, and ask the current page number.

See Also:
Constant Field Values

PROPERTY_DEFAULT_COMPARATOR

public static final java.lang.String PROPERTY_DEFAULT_COMPARATOR
Property comparator.default. If present, will use use as the classname of the default comparator. Will be overriden by column level comparators.

See Also:
Constant Field Values
Method Detail

setResourceProvider

protected static void setResourceProvider(I18nResourceProvider provider)
Setter for I18nResourceProvider. A resource provider is usually set using displaytag properties, this accessor is needed for tests.

Parameters:
provider - I18nResourceProvider instance

setLocaleResolver

protected static void setLocaleResolver(LocaleResolver resolver)
Setter for LocaleResolver. A locale resolver is usually set using displaytag properties, this accessor is needed for tests.

Parameters:
resolver - LocaleResolver instance

getLocaleResolverInstance

public static LocaleResolver getLocaleResolverInstance()
                                                throws TablePropertiesLoadException
Returns the configured Locale Resolver. This method is called before the loading of localized properties.

Returns:
LocaleResolver instance.
Throws:
TablePropertiesLoadException - if the default TableTag.properties file is not found.

clone

protected java.lang.Object clone()
Clones the properties as well.

Overrides:
clone in class java.lang.Object
Returns:
a new clone of oneself

getInstance

public static TableProperties getInstance(javax.servlet.http.HttpServletRequest request)
Returns a new TableProperties instance for the given locale.

Parameters:
request - HttpServletRequest needed to extract the locale to use. If null the default locale will be used.
Returns:
TableProperties instance

clearProperties

public static void clearProperties()
Unload all cached properties. This will not clear properties set by by setUserProperties; you must clear those manually.


setUserProperties

public static void setUserProperties(java.util.Properties overrideProperties)
Local, non-default properties; these settings override the defaults from displaytag.properties and TableTag.properties. Please note that the values are copied in, so that multiple calls with non-overlapping properties will be merged, not overwritten. Note: setUserProperties() MUST BE CALLED before the first TableProperties instantation.

Parameters:
overrideProperties - - The local, non-default properties

getLocale

public java.util.Locale getLocale()
The locale for which these properties are intended.

Returns:
the locale

getPagingInvalidPage

public java.lang.String getPagingInvalidPage()
Getter for the PROPERTY_STRING_PAGING_INVALIDPAGE property.

Returns:
String

getPagingItemName

public java.lang.String getPagingItemName()
Getter for the PROPERTY_STRING_PAGING_ITEM_NAME property.

Returns:
String

getPagingItemsName

public java.lang.String getPagingItemsName()
Getter for the PROPERTY_STRING_PAGING_ITEMS_NAME property.

Returns:
String

getPagingFoundNoItems

public java.lang.String getPagingFoundNoItems()
Getter for the PROPERTY_STRING_PAGING_NOITEMS property.

Returns:
String

getPagingFoundOneItem

public java.lang.String getPagingFoundOneItem()
Getter for the PROPERTY_STRING_PAGING_FOUND_ONEITEM property.

Returns:
String

getPagingFoundAllItems

public java.lang.String getPagingFoundAllItems()
Getter for the PROPERTY_STRING_PAGING_FOUND_ALLITEMS property.

Returns:
String

getPagingFoundSomeItems

public java.lang.String getPagingFoundSomeItems()
Getter for the PROPERTY_STRING_PAGING_FOUND_SOMEITEMS property.

Returns:
String

getPagingGroupSize

public int getPagingGroupSize()
Getter for the PROPERTY_INT_PAGING_GROUPSIZE property.

Returns:
int

getPagingBannerOnePage

public java.lang.String getPagingBannerOnePage()
Getter for the PROPERTY_STRING_PAGING_BANNER_ONEPAGE property.

Returns:
String

getPagingBannerFirst

public java.lang.String getPagingBannerFirst()
Getter for the PROPERTY_STRING_PAGING_BANNER_FIRST property.

Returns:
String

getPagingBannerLast

public java.lang.String getPagingBannerLast()
Getter for the PROPERTY_STRING_PAGING_BANNER_LAST property.

Returns:
String

getPagingBannerFull

public java.lang.String getPagingBannerFull()
Getter for the PROPERTY_STRING_PAGING_BANNER_FULL property.

Returns:
String

getPagingPageLink

public java.lang.String getPagingPageLink()
Getter for the PROPERTY_STRING_PAGING_PAGE_LINK property.

Returns:
String

getPagingPageSelected

public java.lang.String getPagingPageSelected()
Getter for the PROPERTY_STRING_PAGING_PAGE_SELECTED property.

Returns:
String

getPagingPageSeparator

public java.lang.String getPagingPageSeparator()
Getter for the PROPERTY_STRING_PAGING_PAGE_SPARATOR property.

Returns:
String

getAddExport

public boolean getAddExport(MediaTypeEnum exportType)
Is the given export option enabled?

Parameters:
exportType - instance of MediaTypeEnum
Returns:
boolean true if export is enabled

getExportHeader

public boolean getExportHeader(MediaTypeEnum exportType)
Should headers be included in given export type?

Parameters:
exportType - instance of MediaTypeEnum
Returns:
boolean true if export should include headers

getExportLabel

public java.lang.String getExportLabel(MediaTypeEnum exportType)
Returns the label for the given export option.

Parameters:
exportType - instance of MediaTypeEnum
Returns:
String label

getExportFileName

public java.lang.String getExportFileName(MediaTypeEnum exportType)
Returns the file name for the given media. Can be null

Parameters:
exportType - instance of MediaTypeEnum
Returns:
String filename

getExportDecorated

public boolean getExportDecorated()
Getter for the PROPERTY_BOOLEAN_EXPORTDECORATED property.

Returns:
boolean true if decorators should be used in exporting

getExportBanner

public java.lang.String getExportBanner()
Getter for the PROPERTY_STRING_EXPORTBANNER property.

Returns:
String

getExportBannerSeparator

public java.lang.String getExportBannerSeparator()
Getter for the PROPERTY_STRING_EXPORTBANNER_SEPARATOR property.

Returns:
String

getShowHeader

public boolean getShowHeader()
Getter for the PROPERTY_BOOLEAN_SHOWHEADER property.

Returns:
boolean

getEmptyListMessage

public java.lang.String getEmptyListMessage()
Getter for the PROPERTY_STRING_EMPTYLIST_MESSAGE property.

Returns:
String

getEmptyListRowMessage

public java.lang.String getEmptyListRowMessage()
Getter for the PROPERTY_STRING_EMPTYLISTROW_MESSAGE property.

Returns:
String

getEmptyListShowTable

public boolean getEmptyListShowTable()
Getter for the PROPERTY_BOOLEAN_EMPTYLIST_SHOWTABLE property.

Returns:
boolean true if table should be displayed also if no items are found

getExportFullList

public boolean getExportFullList()
Getter for the PROPERTY_STRING_EXPORTAMOUNT property.

Returns:
boolean true if export.amount is list

getSortFullList

public boolean getSortFullList()
Getter for the PROPERTY_STRING_SORTAMOUNT property.

Returns:
boolean true if sort.amount is list

getAddPagingBannerTop

public boolean getAddPagingBannerTop()
Should paging banner be added before the table?

Returns:
boolean

getAddPagingBannerBottom

public boolean getAddPagingBannerBottom()
Should paging banner be added after the table?

Returns:
boolean

getCssRow

public java.lang.String getCssRow(int rowNumber)
Returns the appropriate css class for a table row.

Parameters:
rowNumber - row number
Returns:
the value of PROPERTY_CSS_TR_EVEN if rowNumber is even or PROPERTY_CSS_TR_ODD if rowNumber is odd.

getCssOrder

public java.lang.String getCssOrder(boolean ascending)
Returns the appropriate css class for a sorted column header.

Parameters:
ascending - true if column is sorded in ascending order.
Returns:
the value of PROPERTY_CSS_TH_SORTED_ASCENDING if column is sorded in ascending order or PROPERTY_CSS_TH_SORTED_DESCENDING if column is sorded in descending order.

getCssSorted

public java.lang.String getCssSorted()
Returns the configured css class for a sorted column header.

Returns:
the value of PROPERTY_CSS_TH_SORTED

getCssTable

public java.lang.String getCssTable()
Returns the configured css class for the main table tag.

Returns:
the value of PROPERTY_CSS_TABLE

getCssSortable

public java.lang.String getCssSortable()
Returns the configured css class for a sortable column header.

Returns:
the value of PROPERTY_CSS_TH_SORTABLE

getExportTypes

public java.lang.String[] getExportTypes()
Returns the configured list of media.

Returns:
the value of PROPERTY_EXPORTTYPES

getExportClass

public java.lang.String getExportClass(java.lang.String exportName)
Returns the class responsible for the given export.

Parameters:
exportName - export name
Returns:
String classname

getRequestHelperFactoryInstance

public RequestHelperFactory getRequestHelperFactoryInstance()
                                                     throws FactoryInstantiationException
Returns an instance of configured requestHelperFactory.

Returns:
RequestHelperFactory instance.
Throws:
FactoryInstantiationException - if unable to load or instantiate the configurated class.

getDecoratorFactoryInstance

public DecoratorFactory getDecoratorFactoryInstance()
                                             throws FactoryInstantiationException
Returns an instance of configured DecoratorFactory.

Returns:
DecoratorFactory instance.
Throws:
FactoryInstantiationException - if unable to load or instantiate the configurated class.

getPaginationSortParam

public java.lang.String getPaginationSortParam()

getPaginationPageNumberParam

public java.lang.String getPaginationPageNumberParam()

getPaginationSortDirectionParam

public java.lang.String getPaginationSortDirectionParam()

getPaginationSearchIdParam

public java.lang.String getPaginationSearchIdParam()

getPaginationAscValue

public java.lang.String getPaginationAscValue()

getPaginationDescValue

public java.lang.String getPaginationDescValue()

getPaginationSkipPageNumberInSort

public boolean getPaginationSkipPageNumberInSort()

geResourceProvider

public I18nResourceProvider geResourceProvider()
Returns the configured resource provider instance. If necessary instantiate the resource provider from config and then keep a cached instance.

Returns:
I18nResourceProvider instance.
See Also:
I18nResourceProvider

setProperty

public void setProperty(java.lang.String key,
                        java.lang.String value)
Sets a property.

Parameters:
key - property name
value - property value

getExportDecoratorName

public java.lang.String getExportDecoratorName(MediaTypeEnum thatEnum)
Deprecated. Use getMediaTypeDecoratorName instead.

Obtain the name of the decorator configured for a given media type.

Parameters:
thatEnum - A media type
Returns:
The name of the decorator configured for a given media type.

getMediaTypeDecoratorName

public java.lang.String getMediaTypeDecoratorName(MediaTypeEnum thatEnum)
Obtain the name of the decorator configured for a given media type.

Parameters:
thatEnum - A media type
Returns:
The name of the decorator configured for a given media type.

getDefaultComparator

public java.util.Comparator getDefaultComparator()


Copyright © 2002-2010 the Displaytag team. All Rights Reserved.