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.
Field Summary |
---|
public static final String | DEFAULT_FILENAME | name of the default properties file name ("displaytag.properties"). |
public static final 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. |
public static final String | PROPERTY_STRING_EXPORTBANNER | property export.banner . |
public static final String | PROPERTY_STRING_EXPORTBANNER_SEPARATOR | property export.banner.sepchar . |
public static final String | PROPERTY_BOOLEAN_EXPORTDECORATED | property export.decorated . |
public static final String | PROPERTY_STRING_EXPORTAMOUNT | property export.amount . |
public static final String | PROPERTY_STRING_SORTAMOUNT | property sort.amount . |
public static final String | PROPERTY_BOOLEAN_SHOWHEADER | property basic.show.header . |
public static final String | PROPERTY_STRING_EMPTYLIST_MESSAGE | property basic.msg.empty_list . |
public static final String | PROPERTY_STRING_EMPTYLISTROW_MESSAGE | property basic.msg.empty_list_row . |
public static final String | PROPERTY_BOOLEAN_EMPTYLIST_SHOWTABLE | property basic.empty.showtable . |
public static final String | PROPERTY_STRING_BANNER_PLACEMENT | property paging.banner.placement . |
public static final String | PROPERTY_STRING_PAGING_INVALIDPAGE | property error.msg.invalid_page . |
public static final String | PROPERTY_STRING_PAGING_ITEM_NAME | property paging.banner.item_name . |
public static final String | PROPERTY_STRING_PAGING_ITEMS_NAME | property paging.banner.items_name . |
public static final String | PROPERTY_STRING_PAGING_NOITEMS | property paging.banner.no_items_found . |
public static final String | PROPERTY_STRING_PAGING_FOUND_ONEITEM | property paging.banner.one_item_found . |
public static final String | PROPERTY_STRING_PAGING_FOUND_ALLITEMS | property paging.banner.all_items_found . |
public static final String | PROPERTY_STRING_PAGING_FOUND_SOMEITEMS | property paging.banner.some_items_found . |
public static final String | PROPERTY_INT_PAGING_GROUPSIZE | property paging.banner.group_size . |
public static final String | PROPERTY_STRING_PAGING_BANNER_ONEPAGE | property paging.banner.onepage . |
public static final String | PROPERTY_STRING_PAGING_BANNER_FIRST | property paging.banner.first . |
public static final String | PROPERTY_STRING_PAGING_BANNER_LAST | property paging.banner.last . |
public static final String | PROPERTY_STRING_PAGING_BANNER_FULL | property paging.banner.full . |
public static final String | PROPERTY_STRING_PAGING_PAGE_LINK | property paging.banner.page.link . |
public static final String | PROPERTY_STRING_PAGING_PAGE_SELECTED | property paging.banner.page.selected . |
public static final String | PROPERTY_STRING_PAGING_PAGE_SPARATOR | property paging.banner.page.separator . |
public static final String | PROPERTY_CLASS_REQUESTHELPERFACTORY | property factory.requestHelper . |
public static final String | PROPERTY_CLASS_DECORATORFACTORY | property factory.decorators . |
public static final String | PROPERTY_CLASS_LOCALEPROVIDER | property locale.provider . |
public static final String | PROPERTY_CLASS_LOCALERESOLVER | property locale.resolver . |
public static final String | PROPERTY_CSS_TR_EVEN | property css.tr.even : holds the name of the css class for even rows. Defaults to
even . |
public static final String | PROPERTY_CSS_TR_ODD | property css.tr.odd : holds the name of the css class for odd rows. Defaults to odd . |
public static final 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. |
public static final 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. |
public static final 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 . |
public static final 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 . |
public static final 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 . |
public static final String | PROPERTY_EXPORT_PREFIX | prefix used for all the properties related to export ("export"). The full property name is export.
[export type]. [property name] |
public static final String | PROPERTY_DECORATOR_SUFFIX | prefix used to set the media decorator property name. The full property name is
decorator.media. [export type]. |
public static final String | PROPERTY_DECORATOR_MEDIA | used to set the media decorator property name. The full property name is
decorator.media. [export type] |
public static final String | PROPERTY_EXPORTTYPES | property export.types : holds the list of export available export types. |
public static final String | EXPORTPROPERTY_STRING_LABEL | export property label . |
public static final String | EXPORTPROPERTY_STRING_CLASS | export property class . |
public static final String | EXPORTPROPERTY_BOOLEAN_EXPORTHEADER | export property include_header . |
public static final String | EXPORTPROPERTY_STRING_FILENAME | export property filename . |
public static final 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 |
public static final 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) |
public static final 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 |
public static final 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 |
public static final 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" |
public static final 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" |
public static final 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. |
public static final 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. |
Method from org.displaytag.properties.TableProperties Summary: |
---|
clearProperties, clone, geResourceProvider, getAddExport, getAddPagingBannerBottom, getAddPagingBannerTop, getCssOrder, getCssRow, getCssSortable, getCssSorted, getCssTable, getDecoratorFactoryInstance, getDefaultComparator, getEmptyListMessage, getEmptyListRowMessage, getEmptyListShowTable, getExportBanner, getExportBannerSeparator, getExportClass, getExportDecorated, getExportDecoratorName, getExportFileName, getExportFullList, getExportHeader, getExportLabel, getExportTypes, getInstance, getLocale, getLocaleResolverInstance, getMediaTypeDecoratorName, getPaginationAscValue, getPaginationDescValue, getPaginationPageNumberParam, getPaginationSearchIdParam, getPaginationSkipPageNumberInSort, getPaginationSortDirectionParam, getPaginationSortParam, getPagingBannerFirst, getPagingBannerFull, getPagingBannerLast, getPagingBannerOnePage, getPagingFoundAllItems, getPagingFoundNoItems, getPagingFoundOneItem, getPagingFoundSomeItems, getPagingGroupSize, getPagingInvalidPage, getPagingItemName, getPagingItemsName, getPagingPageLink, getPagingPageSelected, getPagingPageSeparator, getRequestHelperFactoryInstance, getShowHeader, getSortFullList, setLocaleResolver, setProperty, setResourceProvider, setUserProperties |
Method from org.displaytag.properties.TableProperties Detail: |
public static void clearProperties() {
prototypes.clear();
}
Unload all cached properties. This will not clear properties set by by setUserProperties; you must clear those
manually. |
protected Object clone() {
TableProperties twin;
try
{
twin = (TableProperties) super.clone();
}
catch (CloneNotSupportedException e)
{
// should never happen
throw new UnhandledException(e);
}
twin.properties = (Properties) this.properties.clone();
return twin;
}
Clones the properties as well. |
public I18nResourceProvider geResourceProvider() {
String className = getProperty(PROPERTY_CLASS_LOCALEPROVIDER);
if (resourceProvider == null)
{
if (className != null)
{
try
{
Class classProperty = ReflectHelper.classForName(className);
resourceProvider = (I18nResourceProvider) classProperty.newInstance();
log.info(Messages.getString("TableProperties.classinitializedto", //$NON-NLS-1$
new Object[]{ClassUtils.getShortClassName(I18nResourceProvider.class), className}));
}
catch (Throwable e)
{
log.warn(Messages.getString("TableProperties.errorloading", //$NON-NLS-1$
new Object[]{
ClassUtils.getShortClassName(I18nResourceProvider.class),
e.getClass().getName(),
e.getMessage()}));
}
}
else
{
log.info(Messages.getString("TableProperties.noconfigured", //$NON-NLS-1$
new Object[]{ClassUtils.getShortClassName(I18nResourceProvider.class)}));
}
// still null?
if (resourceProvider == null)
{
// fallback provider, no i18n
resourceProvider = new I18nResourceProvider()
{
// Always returns null
public String getResource(String titleKey, String property, Tag tag, PageContext context)
{
return null;
}
};
}
}
return resourceProvider;
}
Returns the configured resource provider instance. If necessary instantiate the resource provider from config and
then keep a cached instance. |
public boolean getAddExport(MediaTypeEnum exportType) {
return getBooleanProperty(PROPERTY_EXPORT_PREFIX + SEP + exportType.getName());
}
Is the given export option enabled? |
public boolean getAddPagingBannerBottom() {
String placement = getProperty(PROPERTY_STRING_BANNER_PLACEMENT);
return "bottom".equals(placement) || "both".equals(placement); //$NON-NLS-1$ //$NON-NLS-2$
}
Should paging banner be added after the table? |
public boolean getAddPagingBannerTop() {
String placement = getProperty(PROPERTY_STRING_BANNER_PLACEMENT);
return "top".equals(placement) || "both".equals(placement); //$NON-NLS-1$ //$NON-NLS-2$
}
Should paging banner be added before the table? |
public String getCssOrder(boolean ascending) {
return getProperty(ascending ? PROPERTY_CSS_TH_SORTED_ASCENDING : PROPERTY_CSS_TH_SORTED_DESCENDING);
}
Returns the appropriate css class for a sorted column header. |
public String getCssRow(int rowNumber) {
return getProperty((rowNumber % 2 == 0) ? PROPERTY_CSS_TR_ODD : PROPERTY_CSS_TR_EVEN);
}
Returns the appropriate css class for a table row. |
public String getCssSortable() {
return getProperty(PROPERTY_CSS_TH_SORTABLE);
}
Returns the configured css class for a sortable column header. |
public String getCssSorted() {
return getProperty(PROPERTY_CSS_TH_SORTED);
}
Returns the configured css class for a sorted column header. |
public String getCssTable() {
return getProperty(PROPERTY_CSS_TABLE);
}
Returns the configured css class for the main table tag. |
public DecoratorFactory getDecoratorFactoryInstance() throws FactoryInstantiationException {
Object loadedObject = getClassPropertyInstance(PROPERTY_CLASS_DECORATORFACTORY);
if (loadedObject == null)
{
return new DefaultDecoratorFactory();
}
try
{
return (DecoratorFactory) loadedObject;
}
catch (ClassCastException e)
{
throw new FactoryInstantiationException(getClass(), PROPERTY_CLASS_DECORATORFACTORY, loadedObject
.getClass()
.getName(), e);
}
}
Returns an instance of configured DecoratorFactory. |
public Comparator getDefaultComparator() {
String className = getProperty(PROPERTY_DEFAULT_COMPARATOR);
if (className != null)
{
try
{
Class classProperty = ReflectHelper.classForName(className);
return (Comparator) classProperty.newInstance();
}
catch (Throwable e)
{
log.warn(Messages.getString("TableProperties.errorloading", //$NON-NLS-1$
new Object[]{
ClassUtils.getShortClassName(Comparator.class),
e.getClass().getName(),
e.getMessage()}));
}
}
return new DefaultComparator(Collator.getInstance(getLocale()));
}
|
public String getEmptyListMessage() {
return getProperty(PROPERTY_STRING_EMPTYLIST_MESSAGE);
}
Getter for the PROPERTY_STRING_EMPTYLIST_MESSAGE property. |
public String getEmptyListRowMessage() {
return getProperty(PROPERTY_STRING_EMPTYLISTROW_MESSAGE);
}
Getter for the PROPERTY_STRING_EMPTYLISTROW_MESSAGE property. |
public boolean getEmptyListShowTable() {
return getBooleanProperty(PROPERTY_BOOLEAN_EMPTYLIST_SHOWTABLE);
}
Getter for the PROPERTY_BOOLEAN_EMPTYLIST_SHOWTABLE property. |
public String getExportBanner() {
return getProperty(PROPERTY_STRING_EXPORTBANNER);
}
Getter for the PROPERTY_STRING_EXPORTBANNER property. |
public String getExportBannerSeparator() {
return getProperty(PROPERTY_STRING_EXPORTBANNER_SEPARATOR);
}
Getter for the PROPERTY_STRING_EXPORTBANNER_SEPARATOR property. |
public String getExportClass(String exportName) {
return getProperty(PROPERTY_EXPORT_PREFIX + SEP + exportName + SEP + EXPORTPROPERTY_STRING_CLASS);
}
Returns the class responsible for the given export. |
public boolean getExportDecorated() {
return getBooleanProperty(PROPERTY_BOOLEAN_EXPORTDECORATED);
}
Getter for the PROPERTY_BOOLEAN_EXPORTDECORATED property. |
public String getExportDecoratorName(MediaTypeEnum thatEnum) {
return getProperty(PROPERTY_EXPORT_PREFIX + SEP + thatEnum + SEP + PROPERTY_DECORATOR_SUFFIX);
} Deprecated! Use - getMediaTypeDecoratorName instead.
Obtain the name of the decorator configured for a given media type. |
public String getExportFileName(MediaTypeEnum exportType) {
return getProperty(PROPERTY_EXPORT_PREFIX + SEP + exportType.getName() + SEP + EXPORTPROPERTY_STRING_FILENAME);
}
Returns the file name for the given media. Can be null |
public boolean getExportFullList() {
return "list".equals(getProperty(PROPERTY_STRING_EXPORTAMOUNT)); //$NON-NLS-1$
}
Getter for the PROPERTY_STRING_EXPORTAMOUNT property. |
public boolean getExportHeader(MediaTypeEnum exportType) {
return getBooleanProperty(PROPERTY_EXPORT_PREFIX
+ SEP
+ exportType.getName()
+ SEP
+ EXPORTPROPERTY_BOOLEAN_EXPORTHEADER);
}
Should headers be included in given export type? |
public String getExportLabel(MediaTypeEnum exportType) {
return getProperty(PROPERTY_EXPORT_PREFIX + SEP + exportType.getName() + SEP + EXPORTPROPERTY_STRING_LABEL);
}
Returns the label for the given export option. |
public String[] getExportTypes() {
String list = getProperty(PROPERTY_EXPORTTYPES);
if (list == null)
{
return new String[0];
}
return StringUtils.split(list);
}
Returns the configured list of media. |
public static TableProperties getInstance(HttpServletRequest request) {
Locale locale;
if (request != null)
{
locale = getLocaleResolverInstance().resolveLocale(request);
}
else
{
// for some configuration parameters locale doesn't matter
locale = Locale.getDefault();
}
TableProperties props = (TableProperties) prototypes.get(locale);
if (props == null)
{
TableProperties lprops = new TableProperties(locale);
prototypes.put(locale, lprops);
props = lprops;
}
return (TableProperties) props.clone();
}
Returns a new TableProperties instance for the given locale. |
public Locale getLocale() {
return locale;
}
The locale for which these properties are intended. |
public static LocaleResolver getLocaleResolverInstance() throws TablePropertiesLoadException {
if (localeResolver == null)
{
// special handling, table properties is not yet instantiated
String className = null;
ResourceBundle defaultUserProperties = loadUserProperties(Locale.getDefault());
// if available, user properties have higher precedence
if (defaultUserProperties != null)
{
try
{
className = defaultUserProperties.getString(PROPERTY_CLASS_LOCALERESOLVER);
}
catch (MissingResourceException e)
{
// no problem
}
}
// still null? load defaults
if (className == null)
{
Properties defaults = loadBuiltInProperties();
className = defaults.getProperty(PROPERTY_CLASS_LOCALERESOLVER);
}
if (className != null)
{
try
{
Class classProperty = ReflectHelper.classForName(className);
localeResolver = (LocaleResolver) classProperty.newInstance();
log.info(Messages.getString("TableProperties.classinitializedto", //$NON-NLS-1$
new Object[]{ClassUtils.getShortClassName(LocaleResolver.class), className}));
}
catch (Throwable e)
{
log.warn(Messages.getString("TableProperties.errorloading", //$NON-NLS-1$
new Object[]{
ClassUtils.getShortClassName(LocaleResolver.class),
e.getClass().getName(),
e.getMessage()}));
}
}
else
{
log.info(Messages.getString("TableProperties.noconfigured", //$NON-NLS-1$
new Object[]{ClassUtils.getShortClassName(LocaleResolver.class)}));
}
// still null?
if (localeResolver == null)
{
// fallback locale resolver
localeResolver = new LocaleResolver()
{
public Locale resolveLocale(HttpServletRequest request)
{
return request.getLocale();
}
};
}
}
return localeResolver;
}
Returns the configured Locale Resolver. This method is called before the loading of localized properties. |
public String getMediaTypeDecoratorName(MediaTypeEnum thatEnum) {
return getProperty(PROPERTY_DECORATOR_SUFFIX + SEP + PROPERTY_DECORATOR_MEDIA + SEP + thatEnum);
}
Obtain the name of the decorator configured for a given media type. |
public String getPaginationAscValue() {
String result = getProperty(PROPERTY_STRING_PAGINATION_ASC_VALUE);
if (result == null)
{
result = "asc";
}
return result;
}
|
public String getPaginationDescValue() {
String result = getProperty(PROPERTY_STRING_PAGINATION_DESC_VALUE);
if (result == null)
{
result = "desc";
}
return result;
}
|
public String getPaginationPageNumberParam() {
String result = getProperty(PROPERTY_STRING_PAGINATION_PAGE_NUMBER_PARAM);
if (result == null)
{
result = "page";
}
return result;
}
|
public String getPaginationSearchIdParam() {
String result = getProperty(PROPERTY_STRING_PAGINATION_SEARCH_ID_PARAM);
if (result == null)
{
result = "searchId";
}
return result;
}
|
public boolean getPaginationSkipPageNumberInSort() {
String s = getProperty(PROPERTY_BOOLEAN_PAGINATION_SKIP_PAGE_NUMBER_IN_SORT);
if (s == null)
{
return true;
}
else
{
return getBooleanProperty(PROPERTY_BOOLEAN_PAGINATION_SKIP_PAGE_NUMBER_IN_SORT);
}
}
|
public String getPaginationSortDirectionParam() {
String result = getProperty(PROPERTY_STRING_PAGINATION_SORT_DIRECTION_PARAM);
if (result == null)
{
result = "dir";
}
return result;
}
|
public String getPaginationSortParam() {
String result = getProperty(PROPERTY_STRING_PAGINATION_SORT_PARAM);
if (result == null)
{
result = "sort";
}
return result;
}
|
public String getPagingBannerFirst() {
return getProperty(PROPERTY_STRING_PAGING_BANNER_FIRST);
}
Getter for the PROPERTY_STRING_PAGING_BANNER_FIRST property. |
public String getPagingBannerFull() {
return getProperty(PROPERTY_STRING_PAGING_BANNER_FULL);
}
Getter for the PROPERTY_STRING_PAGING_BANNER_FULL property. |
public String getPagingBannerLast() {
return getProperty(PROPERTY_STRING_PAGING_BANNER_LAST);
}
Getter for the PROPERTY_STRING_PAGING_BANNER_LAST property. |
public String getPagingBannerOnePage() {
return getProperty(PROPERTY_STRING_PAGING_BANNER_ONEPAGE);
}
Getter for the PROPERTY_STRING_PAGING_BANNER_ONEPAGE property. |
public String getPagingFoundAllItems() {
return getProperty(PROPERTY_STRING_PAGING_FOUND_ALLITEMS);
}
Getter for the PROPERTY_STRING_PAGING_FOUND_ALLITEMS property. |
public String getPagingFoundNoItems() {
return getProperty(PROPERTY_STRING_PAGING_NOITEMS);
}
Getter for the PROPERTY_STRING_PAGING_NOITEMS property. |
public String getPagingFoundOneItem() {
return getProperty(PROPERTY_STRING_PAGING_FOUND_ONEITEM);
}
Getter for the PROPERTY_STRING_PAGING_FOUND_ONEITEM property. |
public String getPagingFoundSomeItems() {
return getProperty(PROPERTY_STRING_PAGING_FOUND_SOMEITEMS);
}
Getter for the PROPERTY_STRING_PAGING_FOUND_SOMEITEMS property. |
public int getPagingGroupSize() {
// default size is 8
return getIntProperty(PROPERTY_INT_PAGING_GROUPSIZE, 8);
}
Getter for the PROPERTY_INT_PAGING_GROUPSIZE property. |
public String getPagingInvalidPage() {
return getProperty(PROPERTY_STRING_PAGING_INVALIDPAGE);
}
Getter for the PROPERTY_STRING_PAGING_INVALIDPAGE property. |
public String getPagingItemName() {
return getProperty(PROPERTY_STRING_PAGING_ITEM_NAME);
}
Getter for the PROPERTY_STRING_PAGING_ITEM_NAME property. |
public String getPagingItemsName() {
return getProperty(PROPERTY_STRING_PAGING_ITEMS_NAME);
}
Getter for the PROPERTY_STRING_PAGING_ITEMS_NAME property. |
public String getPagingPageLink() {
return getProperty(PROPERTY_STRING_PAGING_PAGE_LINK);
}
Getter for the PROPERTY_STRING_PAGING_PAGE_LINK property. |
public String getPagingPageSelected() {
return getProperty(PROPERTY_STRING_PAGING_PAGE_SELECTED);
}
Getter for the PROPERTY_STRING_PAGING_PAGE_SELECTED property. |
public String getPagingPageSeparator() {
return getProperty(PROPERTY_STRING_PAGING_PAGE_SPARATOR);
}
Getter for the PROPERTY_STRING_PAGING_PAGE_SPARATOR property. |
public RequestHelperFactory getRequestHelperFactoryInstance() throws FactoryInstantiationException {
Object loadedObject = getClassPropertyInstance(PROPERTY_CLASS_REQUESTHELPERFACTORY);
// should not be null, but avoid errors just in case... see DISPL-148
if (loadedObject == null)
{
return new DefaultRequestHelperFactory();
}
try
{
return (RequestHelperFactory) loadedObject;
}
catch (ClassCastException e)
{
throw new FactoryInstantiationException(getClass(), PROPERTY_CLASS_REQUESTHELPERFACTORY, loadedObject
.getClass()
.getName(), e);
}
}
Returns an instance of configured requestHelperFactory. |
public boolean getShowHeader() {
return getBooleanProperty(PROPERTY_BOOLEAN_SHOWHEADER);
}
Getter for the PROPERTY_BOOLEAN_SHOWHEADER property. |
public boolean getSortFullList() {
return "list".equals(getProperty(PROPERTY_STRING_SORTAMOUNT)); //$NON-NLS-1$
}
Getter for the PROPERTY_STRING_SORTAMOUNT property. |
protected static void setLocaleResolver(LocaleResolver resolver) {
localeResolver = resolver;
}
Setter for LocaleResolver. A locale resolver is usually set using displaytag properties, this accessor is needed
for tests. |
public void setProperty(String key,
String value) {
this.properties.setProperty(key, value);
}
|
protected static void setResourceProvider(I18nResourceProvider provider) {
resourceProvider = provider;
}
Setter for I18nResourceProvider. A resource provider is usually set using displaytag properties, this accessor is
needed for tests. |
public static void setUserProperties(Properties overrideProperties) {
// copy keys here, so that this can be invoked more than once from different sources.
// if default properties are not yet loaded they will be copied in constructor
Enumeration keys = overrideProperties.keys();
while (keys.hasMoreElements())
{
String key = (String) keys.nextElement();
if (key != null)
{
userProperties.setProperty(key, (String) overrideProperties.get(key));
}
}
}
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. |