⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tableproperties.java

📁 dispalytag的源码
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
/** * Licensed under the Artistic License; you may not use this file * except in compliance with the License. * You may obtain a copy of the License at * *      http://displaytag.sourceforge.net/license.html * * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */package org.displaytag.properties;import java.io.IOException;import java.io.InputStream;import java.util.*;import java.text.Collator;import javax.servlet.http.HttpServletRequest;import javax.servlet.jsp.PageContext;import javax.servlet.jsp.tagext.Tag;import org.apache.commons.lang.ClassUtils;import org.apache.commons.lang.StringUtils;import org.apache.commons.lang.UnhandledException;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import org.displaytag.Messages;import org.displaytag.model.DefaultComparator;import org.displaytag.decorator.DecoratorFactory;import org.displaytag.decorator.DefaultDecoratorFactory;import org.displaytag.exception.FactoryInstantiationException;import org.displaytag.exception.TablePropertiesLoadException;import org.displaytag.localization.I18nResourceProvider;import org.displaytag.localization.LocaleResolver;import org.displaytag.util.DefaultRequestHelperFactory;import org.displaytag.util.ReflectHelper;import org.displaytag.util.RequestHelperFactory;/** * 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. * <ol> * <li>First, from the TableTag.properties included with the DisplayTag distribution.</li> * <li>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.</li> * <li>Finally, if this class has a userProperties defined, all of the properties from that Properties object are * copied in as well.</li> * </ol> * @author Fabrizio Giustina * @author rapruitt * @version $Revision: 1096 $ ($Author: rapruitt $) */public final class TableProperties implements Cloneable{    /**     * name of the default properties file name ("displaytag.properties").     */    public static final String DEFAULT_FILENAME = "displaytag.properties"; //$NON-NLS-1$    /**     * 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 LOCAL_PROPERTIES = "displaytag"; //$NON-NLS-1$    /**     * property <code>export.banner</code>.     */    public static final String PROPERTY_STRING_EXPORTBANNER = "export.banner"; //$NON-NLS-1$    /**     * property <code>export.banner.sepchar</code>.     */    public static final String PROPERTY_STRING_EXPORTBANNER_SEPARATOR = "export.banner.sepchar"; //$NON-NLS-1$    /**     * property <code>export.decorated</code>.     */    public static final String PROPERTY_BOOLEAN_EXPORTDECORATED = "export.decorated"; //$NON-NLS-1$    /**     * property <code>export.amount</code>.     */    public static final String PROPERTY_STRING_EXPORTAMOUNT = "export.amount"; //$NON-NLS-1$    /**     * property <code>sort.amount</code>.     */    public static final String PROPERTY_STRING_SORTAMOUNT = "sort.amount"; //$NON-NLS-1$    /**     * property <code>basic.show.header</code>.     */    public static final String PROPERTY_BOOLEAN_SHOWHEADER = "basic.show.header"; //$NON-NLS-1$    /**     * property <code>basic.msg.empty_list</code>.     */    public static final String PROPERTY_STRING_EMPTYLIST_MESSAGE = "basic.msg.empty_list"; //$NON-NLS-1$    /**     * property <code>basic.msg.empty_list_row</code>.     */    public static final String PROPERTY_STRING_EMPTYLISTROW_MESSAGE = "basic.msg.empty_list_row"; //$NON-NLS-1$    /**     * property <code>basic.empty.showtable</code>.     */    public static final String PROPERTY_BOOLEAN_EMPTYLIST_SHOWTABLE = "basic.empty.showtable"; //$NON-NLS-1$    /**     * property <code>paging.banner.placement</code>.     */    public static final String PROPERTY_STRING_BANNER_PLACEMENT = "paging.banner.placement"; //$NON-NLS-1$    /**     * property <code>error.msg.invalid_page</code>.     */    public static final String PROPERTY_STRING_PAGING_INVALIDPAGE = "error.msg.invalid_page"; //$NON-NLS-1$    /**     * property <code>paging.banner.item_name</code>.     */    public static final String PROPERTY_STRING_PAGING_ITEM_NAME = "paging.banner.item_name"; //$NON-NLS-1$    /**     * property <code>paging.banner.items_name</code>.     */    public static final String PROPERTY_STRING_PAGING_ITEMS_NAME = "paging.banner.items_name"; //$NON-NLS-1$    /**     * property <code>paging.banner.no_items_found</code>.     */    public static final String PROPERTY_STRING_PAGING_NOITEMS = "paging.banner.no_items_found"; //$NON-NLS-1$    /**     * property <code>paging.banner.one_item_found</code>.     */    public static final String PROPERTY_STRING_PAGING_FOUND_ONEITEM = "paging.banner.one_item_found"; //$NON-NLS-1$    /**     * property <code>paging.banner.all_items_found</code>.     */    public static final String PROPERTY_STRING_PAGING_FOUND_ALLITEMS = "paging.banner.all_items_found"; //$NON-NLS-1$    /**     * property <code>paging.banner.some_items_found</code>.     */    public static final String PROPERTY_STRING_PAGING_FOUND_SOMEITEMS = "paging.banner.some_items_found"; //$NON-NLS-1$    /**     * property <code>paging.banner.group_size</code>.     */    public static final String PROPERTY_INT_PAGING_GROUPSIZE = "paging.banner.group_size"; //$NON-NLS-1$    /**     * property <code>paging.banner.onepage</code>.     */    public static final String PROPERTY_STRING_PAGING_BANNER_ONEPAGE = "paging.banner.onepage"; //$NON-NLS-1$    /**     * property <code>paging.banner.first</code>.     */    public static final String PROPERTY_STRING_PAGING_BANNER_FIRST = "paging.banner.first"; //$NON-NLS-1$    /**     * property <code>paging.banner.last</code>.     */    public static final String PROPERTY_STRING_PAGING_BANNER_LAST = "paging.banner.last"; //$NON-NLS-1$    /**     * property <code>paging.banner.full</code>.     */    public static final String PROPERTY_STRING_PAGING_BANNER_FULL = "paging.banner.full"; //$NON-NLS-1$    /**     * property <code>paging.banner.page.link</code>.     */    public static final String PROPERTY_STRING_PAGING_PAGE_LINK = "paging.banner.page.link"; //$NON-NLS-1$    /**     * property <code>paging.banner.page.selected</code>.     */    public static final String PROPERTY_STRING_PAGING_PAGE_SELECTED = "paging.banner.page.selected"; //$NON-NLS-1$    /**     * property <code>paging.banner.page.separator</code>.     */    public static final String PROPERTY_STRING_PAGING_PAGE_SPARATOR = "paging.banner.page.separator"; //$NON-NLS-1$    /**     * property <code>factory.requestHelper</code>.     */    public static final String PROPERTY_CLASS_REQUESTHELPERFACTORY = "factory.requestHelper"; //$NON-NLS-1$    /**     * property <code>factory.decorators</code>.     */    public static final String PROPERTY_CLASS_DECORATORFACTORY = "factory.decorator"; //$NON-NLS-1$    /**     * property <code>locale.provider</code>.     */    public static final String PROPERTY_CLASS_LOCALEPROVIDER = "locale.provider"; //$NON-NLS-1$    /**     * property <code>locale.resolver</code>.     */    public static final String PROPERTY_CLASS_LOCALERESOLVER = "locale.resolver"; //$NON-NLS-1$    /**     * property <code>css.tr.even</code>: holds the name of the css class for even rows. Defaults to     * <code>even</code>.     */    public static final String PROPERTY_CSS_TR_EVEN = "css.tr.even"; //$NON-NLS-1$    /**     * property <code>css.tr.odd</code>: holds the name of the css class for odd rows. Defaults to <code>odd</code>.     */    public static final String PROPERTY_CSS_TR_ODD = "css.tr.odd"; //$NON-NLS-1$    /**     * property <code>css.table</code>: 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_TABLE = "css.table"; //$NON-NLS-1$    /**     * property <code>css.th.sortable</code>: 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_SORTABLE = "css.th.sortable"; //$NON-NLS-1$    /**     * property <code>css.th.sorted</code>: holds the name of the css class added to the the header of a sorted     * column. Defaults to <code>sorted</code>.     */    public static final String PROPERTY_CSS_TH_SORTED = "css.th.sorted"; //$NON-NLS-1$    /**     * property <code>css.th.ascending</code>: holds the name of the css class added to the the header of a column     * sorted in ascending order. Defaults to <code>order1</code>.     */    public static final String PROPERTY_CSS_TH_SORTED_ASCENDING = "css.th.ascending"; //$NON-NLS-1$    /**     * property <code>css.th.descending</code>: holds the name of the css class added to the the header of a column     * sorted in descending order. Defaults to <code>order2</code>.     */    public static final String PROPERTY_CSS_TH_SORTED_DESCENDING = "css.th.descending"; //$NON-NLS-1$    /**     * prefix used for all the properties related to export ("export"). The full property name is <code>export.</code>     * <em>[export type]</em><code>.</code><em>[property name]</em>     */    public static final String PROPERTY_EXPORT_PREFIX = "export"; //$NON-NLS-1$    /**     * prefix used to set the media decorator property name. The full property name is      * <code>decorator.media.</code><em>[export type]</em>.     */    public static final String PROPERTY_DECORATOR_SUFFIX = "decorator"; //$NON-NLS-1$    /**     * used to set the media decorator property name. The full property name is      * <code>decorator.media.</code><em>[export type]</em>     */    public static final String PROPERTY_DECORATOR_MEDIA = "media"; //$NON-NLS-1$        /**     * property <code>export.types</code>: holds the list of export available export types.     */    public static final String PROPERTY_EXPORTTYPES = "export.types"; //$NON-NLS-1$    /**     * export property <code>label</code>.     */    public static final String EXPORTPROPERTY_STRING_LABEL = "label"; //$NON-NLS-1$    /**     * export property <code>class</code>.     */    public static final String EXPORTPROPERTY_STRING_CLASS = "class"; //$NON-NLS-1$    /**     * export property <code>include_header</code>.     */    public static final String EXPORTPROPERTY_BOOLEAN_EXPORTHEADER = "include_header"; //$NON-NLS-1$    /**     * export property <code>filename</code>.     */    public static final String EXPORTPROPERTY_STRING_FILENAME = "filename"; //$NON-NLS-1$    /**     * Property <code>pagination.sort.param</code>. 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_PARAM = "pagination.sort.param"; //$NON-NLS-1$    /**     * Property <code>pagination.sortdirection.param</code>. 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_SORT_DIRECTION_PARAM = "pagination.sortdirection.param"; //$NON-NLS-1$    /**     * Property <code>pagination.pagenumber.param</code>. 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_PAGE_NUMBER_PARAM = "pagination.pagenumber.param"; //$NON-NLS-1$    /**     * Property <code>pagination.searchid.param</code>. 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_SEARCH_ID_PARAM = "pagination.searchid.param"; //$NON-NLS-1$    /**     * Property <code>pagination.sort.asc.value</code>. 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_ASC_VALUE = "pagination.sort.asc.value"; //$NON-NLS-1$    /**     * Property <code>pagination.sort.desc.value</code>. 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_STRING_PAGINATION_DESC_VALUE = "pagination.sort.desc.value"; //$NON-NLS-1$    /**     * Property <code>pagination.sort.skippagenumber</code>. 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_BOOLEAN_PAGINATION_SKIP_PAGE_NUMBER_IN_SORT = "pagination.sort.skippagenumber"; //$NON-NLS-1$

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -