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

📄 columntag.java

📁 exTreme taglib的使用
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/* * Copyright 2004 original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * *    http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package org.extremecomponents.table.tag;import javax.servlet.jsp.JspException;import javax.servlet.jsp.tagext.BodyTagSupport;import org.apache.commons.beanutils.PropertyUtils;import org.apache.commons.lang.StringUtils;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager;import org.extremecomponents.table.bean.Attributes;import org.extremecomponents.table.bean.Column;import org.extremecomponents.util.ExtremeUtils;/** * @jsp.tag name="column" display-name="ColumnTag" body-content="JSP" *          description="The container which holds all the column specific *          information. A copy of each column will be fed to the Model." *  * @author Jeff Johnston */public class ColumnTag extends BodyTagSupport implements ExtendedAttributes {    private static Log logger = LogFactory.getLog(ColumnTag.class);    private String property;    private Object value;    private String title;    private String style;    private String styleClass;    private String headerClass;    private String headerStyle;    private String filterClass;    private String filterStyle;    private String cell;    private String filterCell;    private String headerCell;    private String format;    private String parse;    private String width;    private String showTotal;    private String filterable;    private String sortable;    private String viewsAllowed;    private String viewsDenied;    /**     * @jsp.attribute description="The bean attribute to use for the column."     *                required="true" rtexprvalue="true"     */    public String getProperty() {        String property = TagUtils.evaluateExpressionAsString("property", this.property, this, pageContext);        return ColumnTagUtils.getProperty(TagUtils.getModel(this), property);    }    public void setProperty(String property) {        this.property = property;    }    /**     * @jsp.attribute description="The value for the column. If the value     *                attribute is not specifed then it will be retrieved     *                automatically by using the property attribute. The value     *                can also be defined within the column body."     *                required="false" rtexprvalue="true"     */    public Object getValue() {        return value;    }    public void setValue(Object value) {        this.value = value;    }    /**     * @jsp.attribute description="The verbage that will display on the table     *                column header. If title is not specified then it will     *                default to the name of the property, changing the     *                camelcase syntax to separate words." required="false"     *                rtexprvalue="true"     */    public String getTitle() {        String title = TagUtils.evaluateExpressionAsString("title", this.title, this, pageContext);        return ColumnTagUtils.getTitle(TagUtils.getModel(this), title, getProperty());    }    public void setTitle(String title) {        this.title = title;    }    /**     * @jsp.attribute description="The css class style sheet." required="false"     *                rtexprvalue="true"     */    public String getStyleClass() {        String styleClass = TagUtils.evaluateExpressionAsString("styleClass", this.styleClass, this, pageContext);        return ColumnTagUtils.getStyleClass(TagUtils.getModel(this), styleClass);    }    public void setStyleClass(String styleClass) {        this.styleClass = styleClass;    }    /**     * @jsp.attribute description="The css class style sheet used to define what     *                the table header row column looks like." required="false"     *                rtexprvalue="true"     */    public String getHeaderClass() {        String headerClass = TagUtils.evaluateExpressionAsString("headerClass", this.headerClass, this, pageContext);        return ColumnTagUtils.getHeaderClass(TagUtils.getModel(this), headerClass);    }    public void setHeaderClass(String headerClass) {        this.headerClass = headerClass;    }    /**     * @jsp.attribute description="The css class style sheet." required="false"     *                rtexprvalue="true"     */    public String getHeaderStyle() {        String headerStyle = TagUtils.evaluateExpressionAsString("headerStyle", this.headerStyle, this, pageContext);        return ColumnTagUtils.getHeaderStyle(TagUtils.getModel(this), headerStyle);    }    public void setHeaderStyle(String headerStyle) {        this.headerStyle = headerStyle;    }    /**     * @jsp.attribute description="The css class style sheet used to define what     *                the table filter row column looks like." required="false"     *                rtexprvalue="true"     */    public String getFilterClass() {        String filterClass = TagUtils.evaluateExpressionAsString("filterClass", this.filterClass, this, pageContext);        return ColumnTagUtils.getFilterClass(TagUtils.getModel(this), filterClass);    }    public void setFilterClass(String filterClass) {        this.filterClass = filterClass;    }    /**     * @jsp.attribute description="The css class style sheet." required="false"     *                rtexprvalue="true"     */    public String getFilterStyle() {        String filterStyle = TagUtils.evaluateExpressionAsString("filterStyle", this.filterStyle, this, pageContext);        return ColumnTagUtils.getFilterStyle(TagUtils.getModel(this), filterStyle);    }    public void setFilterStyle(String filterStyle) {        this.filterStyle = filterStyle;    }    /**     * @jsp.attribute description="Displays the column. The valid values are     *                display, currency, number, and date. The default value is     *                display. The cell can also be a fully qualified class name     *                to a custom cell. Be sure to implement the Cell interface     *                or extend BaseCell if making a custom cell."     *                required="false" rtexprvalue="true"     */    public String getCell() {        String cell = TagUtils.evaluateExpressionAsString("cell", this.cell, this, pageContext);        return ColumnTagUtils.getCell(TagUtils.getModel(this), cell);    }    public void setCell(String cell) {        this.cell = cell;    }    /**     * @jsp.attribute description="Displays the filter column. The valid values     *                are filter and droplist. The default is filter. The cell     *                can also be a fully qualified class name to a custom     *                cell." required="false" rtexprvalue="true"     */    public String getFilterCell() {        String filterCell = TagUtils.evaluateExpressionAsString("filterCell", this.filterCell, this, pageContext);        return ColumnTagUtils.getFilterCell(TagUtils.getModel(this), filterCell);    }    public void setFilterCell(String filterCell) {        this.filterCell = filterCell;    }    /**     * @jsp.attribute description="Displays the header column. The default is     *                header. The cell can also be a fully qualified class name     *                to a custom cell." required="false" rtexprvalue="true"     */    public String getHeaderCell() {        String headerCell = TagUtils.evaluateExpressionAsString("headerCell", this.headerCell, this, pageContext);        return ColumnTagUtils.getHeaderCell(TagUtils.getModel(this), headerCell);    }    public void setHeaderCell(String headerCell) {        this.headerCell = headerCell;    }    /**     * @jsp.attribute description="The specific way the column is displayed. For     *                instance if used with a date cell then the format can be     *                MM/dd/yyyy." required="false" rtexprvalue="true"     */    public String getFormat() {        String format = TagUtils.evaluateExpressionAsString("format", this.format, this, pageContext);        return ColumnTagUtils.getFormat(TagUtils.getModel(this), format, getCell());    }    public void setFormat(String format) {        this.format = format;    }    /**     * @jsp.attribute description="Used if the format needs to be interpreted so

⌨️ 快捷键说明

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