/* * 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 java.util.Iterator;import java.util.Locale;import javax.servlet.jsp.JspException;import javax.servlet.jsp.tagext.TagSupport;import javax.servlet.jsp.tagext.TryCatchFinally;import org.apache.commons.lang.StringUtils;import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager;import org.extremecomponents.base.BaseModel;import org.extremecomponents.base.BaseProperties;import org.extremecomponents.table.bean.Attributes;import org.extremecomponents.table.bean.Column;import org.extremecomponents.table.bean.Export;import org.extremecomponents.table.bean.Form;import org.extremecomponents.table.bean.Input;import org.extremecomponents.table.bean.Table;import org.extremecomponents.table.core.TableModel;import org.extremecomponents.table.handler.ExportHandler;import org.extremecomponents.util.ExceptionUtils;/** * @jsp.tag name="table" display-name="TableTag" body-content="JSP" * description="The container which holds all the main table * information. Will also hold global information if needed. The table * tag is copied into the Table and encapsulated in the Model." * * @author Jeff Johnston */public class TableTag extends TagSupport implements ExtendedAttributes, TryCatchFinally { private static final long serialVersionUID = 1061203784681656694L; private BaseModel model; private Iterator iterator; private String id; private String collection; private String action; private String scope; private String styleClass; private String headerClass; private String border; private String cellpadding; private String cellspacing; private String rowsDisplayed; private String imagePath; private String title; private String style; private String width; private String saveFilterSort; private String autoIncludeParameters; private String totalTitle; private String filterable; private String sortable; private String showPagination; private String showExports; private String showStatusBar; private String retrieveRowsCallback; private String filterRowsCallback; private String sortRowsCallback; private String view; private String locale; private String var; /** * The Model represents the internal plumbing of the table */ public BaseModel getModel() { return model; } protected void setModel(BaseModel model) { this.model = model; } /** * @jsp.attribute description="The table id attribute." * required="false" rtexprvalue="true" */ public String getId() { return TableTagUtils.getId(id, getCollection()); } public void setId(String id) { this.id = id; } /** * @jsp.attribute description="Identify the List of Beans or the List of * Maps for the table." required="true" rtexprvalue="true" */ public String getCollection() { return collection; } public void setCollection(String collection) { this.collection = collection; } /** * @jsp.attribute description="The action is the URI that will be called * when the filter, sort and pagination is used." * required="false" rtexprvalue="true" */ public String getAction() { return action; } public void setAction(String action) { this.action = action; } /** * @jsp.attribute description="The scope (page, request, session, * application) to find the List of beans or List of Maps * defined by the collection attribute." required="false" * rtexprvalue="true" */ public String getScope() { return scope; } public void setScope(String scope) { this.scope = scope; } /** * @jsp.attribute description="The css class style sheet." required="false" * rtexprvalue="true" */ public String getStyleClass() { return TableTagUtils.getStyleClass(model, 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. This attribute can * be overridden by the column." required="false" * rtexprvalue="true" */ public String getHeaderClass() { return TableTagUtils.getHeaderClass(model, headerClass); } public void setHeaderClass(String headerClass) { this.headerClass = headerClass; } /** * @jsp.attribute description="The table border attribute." required="false" * rtexprvalue="true" */ public String getBorder() { return TableTagUtils.getBorder(model, border); } public void setBorder(String border) { this.border = border; } /** * @jsp.attribute description="The table cellpadding attribute." * required="false" rtexprvalue="true" */ public String getCellpadding() { return TableTagUtils.getCellpadding(model, cellpadding); } public void setCellpadding(String cellpadding) { this.cellpadding = cellpadding; } /** * @jsp.attribute description="The table cellspacing attribute." * required="false" rtexprvalue="true" */ public String getCellspacing() { return TableTagUtils.getCellspacing(model, cellspacing); } public void setCellspacing(String cellspacing) { this.cellspacing = cellspacing; } /** * @jsp.attribute description="The number of rows to show in the table. If * rowsDisplayed=0 then will show all the rows." * required="false" rtexprvalue="true" */ public String getRowsDisplayed() { return TableTagUtils.getRowsDisplayed(pageContext, model, rowsDisplayed, getShowPagination(), getCollection()); } public void setRowsDisplayed(String rowsDisplayed) { this.rowsDisplayed = rowsDisplayed; } /** * @jsp.attribute description="Specify whether or not the table is * filterable. Acceptable values are true or false." * required="false" rtexprvalue="true" */ public String getFilterable() { return TableTagUtils.getFilterable(model, filterable); } public void setFilterable(String filterable) { this.filterable = filterable; } /** * @jsp.attribute description="Specify whether or not the table should use * pagination. Acceptable values are true or false." * required="false" rtexprvalue="true" */ public String getShowPagination() { return TableTagUtils.getShowPagination(model, showPagination); } public void setShowPagination(String showPagination) { this.showPagination = showPagination; } /** * @jsp.attribute description="Specify whether or not the table should use * the exports. Acceptable values are true or false." * required="false" rtexprvalue="true" */ public String getShowExports() { return TableTagUtils.getShowExports(model, showExports); } public void setShowExports(String showExports) { this.showExports = showExports; } /** * @jsp.attribute description="Specify whether or not the table should use * the status bar. Acceptable values are true or false." * required="false" rtexprvalue="true" */ public String getShowStatusBar() { return TableTagUtils.getShowStatusBar(model, showStatusBar); } public void setShowStatusBar(String showStatusBar) { this.showStatusBar = showStatusBar; } /** * @jsp.attribute description="A convenience method look in one place for * the images, but use the default image names. The syntax * will look like imagePath=/extremesite/images/*.png, where * *.png is saying that will use all .png images." * required="false" rtexprvalue="true" */ public String getImagePath() { return TableTagUtils.getImagePath(model, imagePath); } public void setImagePath(String imagePath) { this.imagePath = imagePath; } /** * @jsp.attribute description="Specify whether or not the table is sortable. * Acceptable values are true or false." required="false" * rtexprvalue="true" */ public String getSortable() { return TableTagUtils.getSortable(model, sortable); } public void setSortable(String sortable) { this.sortable = sortable; } /** * @jsp.attribute description="The title of the table. The title will * display above the table." required="false" * rtexprvalue="true" */ public String getTitle() { return TableTagUtils.getTitle(model, title); } public void setTitle(String title) { this.title = title; } /** * @jsp.attribute description="The css inline style sheet." required="false" * rtexprvalue="true" */ public String getStyle() { return style; } public void setStyle(String style) { this.style = style; } /** * @jsp.attribute description="Width of the table." required="false" * rtexprvalue="true" */ public String getWidth() { return TableTagUtils.getWidth(model, width); } public void setWidth(String width) { this.width = width; } /** * @jsp.attribute description="Save the table state as filtered and/or * sorted." required="false" rtexprvalue="true" */ public String getSaveFilterSort() { return saveFilterSort; } public void setSaveFilterSort(String saveFilterSort) { this.saveFilterSort = saveFilterSort; } /** * @jsp.attribute description="Specify whether or not to automatically * included the parameters." required="false" * rtexprvalue="true" */ public String getAutoIncludeParameters() {
java分页查询源码_tabletag.java 源代码在线查看 - 分页查询控件 分页查询控件 资源下载 虫虫电子下载站...
最新推荐文章于 2022-12-21 14:10:05 发布