📄 columntag.java
字号:
protected Object getColumnValue(Object propertyValue) throws JspException {
Object result = getColumnValue();
if (result == null && mappingItem!=null && propertyValue!=null ){
Object mappingMap=pageContext.findAttribute((String)mappingItem);
Object outValue=null;
if (mappingMap instanceof Map){
Map itemsMap=(Map)mappingMap;
outValue=itemsMap.get(String.valueOf(propertyValue));
if (outValue==null && mappingDefaultKey!=null){
outValue=itemsMap.get(mappingDefaultKey);
}
}
if (outValue==null){
propertyValue=mappingDefaultValue;
}
result=outValue;
}
if (result == null || (result != null && result instanceof String && StringUtils.isBlank(result.toString()))) {
result = propertyValue;
}
return result;
}
////////////////////////////////////
public BaseBean getTagBean() {
return model.getColumnHandler().getColumnByAlias(TableModelUtils.getAlias(alias, property));
}
public void modifyColumnAttributes(TableModel model, Column column) {
}
public void release() {
alias = null;
calc = null;
calcspan = null;
calcSpan = null;
calcTitle = null;
cell = null;
cellEdit = null;
cellName = null;
cellValue = null;
editEvent=null;
editTemplate=null;
editable=null;
ellipsis = null;
escapeAutoFormat = null;
filterable = null;
filterCell = null;
filterClass = null;
// filterOptions = null;
filterStyle = null;
format = null;
group = null;
headerCell = null;
headerClass = null;
headerSpan = null;
headerStyle = null;
headerStyleClass = null;
interceptor = null;
mappingDefaultKey = null;
mappingDefaultValue = null;
mappingItem = null;
minWidth = null;
nowrap = null;
onclick = null;
ondblclick = null;
onmouseout = null;
onmouseover = null;
parse = null;
property = null;
resizeColWidth = null;
sortable = null;
style = null;
styleClass = null;
title = null;
viewsAllowed = null;
viewsDenied = null;
width = null;
tipTitle=null;
super.release();
}
/**
* @jsp.attribute description="Used to uniquely identify the column when the
* same property is used for more than one column."
* required="false" rtexprvalue="true"
*/
public void setAlias(String alias) {
this.alias = alias;
}
/**
* @jsp.attribute description="A fully qualified class name to a
* custom Calc implementation. Could also be a named type
* in the preferences. Used to do math on a column."
* required="false" rtexprvalue="true"
*/
public void setCalc(String calc) {
this.calc = calc;
}
public void setCalcspan(String calcspan) {
this.calcSpan = calcspan;
this.calcspan=calcspan;
}
public void setCalcSpan(String calcSpan) {
this.calcSpan = calcSpan;
}
/**
* @jsp.attribute description="The title of the calc."
* required="false" rtexprvalue="true"
*/
public void setCalcTitle(String totalTitle) {
this.calcTitle = totalTitle;
}
/**
* @jsp.attribute description="Display for the column. The valid values are
* display, currency, rowCount, 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 AbstractCell if making a custom cell."
* required="false" rtexprvalue="true"
*/
public void setCell(String cell) {
this.cell = cell;
}
public void setCellEdit(String cellEdit) {
this.cellEdit = cellEdit;
}
public void setCellValue(String cellValue) {
this.cellValue = cellValue;
}
public void setEllipsis(String ellipsis) {
this.ellipsis = ellipsis;
}
/**
* @jsp.attribute description="Specify whether auto format of value will be
* skipped. False by default, and is only effective if
* autoformatting is implement in the view."
* required="false" rtexprvalue="true"
*/
public void setEscapeAutoFormat(String escapeAutoFormat) {
this.escapeAutoFormat = escapeAutoFormat;
}
/**
* @jsp.attribute description="Specify whether or not the column should be
* filterable. Acceptable values are true or false. The default
* is to use the value for the table filterable attribute."
* required="false" rtexprvalue="true"
*/
public void setFilterable(String filterable) {
this.filterable = filterable;
}
/**
* @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 void setFilterCell(String filterCell) {
this.filterCell = filterCell;
}
/**
* @jsp.attribute description="The css class style sheet used to define what
* the table filter column looks like." required="false"
* rtexprvalue="true"
*/
public void setFilterClass(String filterClass) {
this.filterClass = filterClass;
}
/**
* @jsp.attribute description="The object that contains the collection of elements
* that implement the Option interface."
* required="false" rtexprvalue="true"
*/
public void setFilterOptions(Object filterOptions) {
this.filterOptions = filterOptions;
}
/**
* @jsp.attribute description="The css class style sheet to use for the filter column."
* required="false" rtexprvalue="true"
*/
public void setFilterStyle(String filterStyle) {
this.filterStyle = filterStyle;
}
/**
* @jsp.attribute description="The format to use for the cell. For
* instance if used with a date cell then the format can be
* MM/dd/yyyy." required="false" rtexprvalue="true"
*/
public void setFormat(String format) {
this.format = format;
}
public void setGroup(String group) {
this.group = group;
}
/**
* @jsp.attribute description="Display for 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 void setHeaderCell(String headerCell) {
this.headerCell = headerCell;
}
/**
* @jsp.attribute description="The css class style sheet used to define what
* the table header column looks like." required="false"
* rtexprvalue="true"
*/
public void setHeaderClass(String headerClass) {
this.headerClass = headerClass;
}
public void setHeaderSpan(String headerSpan) {
this.headerSpan = headerSpan;
}
/**
* @jsp.attribute description="The css class style sheet to use for the header column."
* required="false" rtexprvalue="true"
*/
public void setHeaderStyle(String headerStyle) {
this.headerStyle = headerStyle;
}
public void setHeaderStyleClass(String headerStyleClass) {
this.headerStyleClass = headerStyleClass;
this.headerClass=headerStyleClass;
}
/**
* @jsp.attribute description="A fully qualified class name to a custom
* InterceptColumn implementation. Could also be a named type
* in the preferences. Used to add or modify column attributes."
* required="false" rtexprvalue="true"
*/
public void setInterceptor(String interceptor) {
this.interceptor = interceptor;
}
public void setMappingDefaultKey(Object mappingDefaultKey) {
this.mappingDefaultKey = mappingDefaultKey;
}
public void setMappingDefaultValue(Object mappingDefaultValue) {
this.mappingDefaultValue = mappingDefaultValue;
}
public void setMappingItem(Object mappingItem) {
this.mappingItem = mappingItem;
}
public void setMinWidth(String minWidth) {
this.minWidth = minWidth;
}
public void setNowrap(String nowrap) {
this.nowrap = nowrap;
}
public void setOnclick(String onclick) {
this.onclick = onclick;
}
public void setOndblclick(String ondblclick) {
this.ondblclick = ondblclick;
}
public void setOnmouseout(String onmouseout) {
this.onmouseout = onmouseout;
}
public void setOnmouseover(String onmouseover) {
this.onmouseover = onmouseover;
}
/**
* @jsp.attribute description="Used if the format needs to be interpreted.
* For instance, a date needs to be parsed in the specific
* format, such as MM-dd-yyyy."
* required="false" rtexprvalue="true"
*/
public void setParse(String parse) {
this.parse = parse;
}
/**
* @jsp.attribute description="The bean attribute to use for the column."
* required="false" rtexprvalue="true"
*/
public void setProperty(String property) {
this.property = property;
}
/**
* @jsp.attribute description="Specify whether or not the column should be
* sortable. The acceptable values are true or false. The default
* is to use the value for the table sortable attribute."
* required="false" rtexprvalue="true"
*/
public void setSortable(String sortable) {
this.sortable = sortable;
}
/**
* @jsp.attribute description="The css inline style sheet." required="false"
* rtexprvalue="true"
*/
public void setStyle(String style) {
this.style = style;
}
/**
* @jsp.attribute description="The css class style sheet." required="false"
* rtexprvalue="true"
*/
public void setStyleClass(String styleClass) {
this.styleClass = styleClass;
}
/**
* @jsp.attribute description="The display for the table
* column header. If the 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 void setTitle(String title) {
this.title = title;
}
/**
* @jsp.attribute description="The comma separated list of views that this
* column will be used in." required="false"
* rtexprvalue="true"
*/
public void setViewsAllowed(String viewsAllowed) {
this.viewsAllowed = viewsAllowed;
}
/**
* @jsp.attribute description="The comma separated list of views that this
* column will not be used in." required="false"
* rtexprvalue="true"
*/
public void setViewsDenied(String viewsDenied) {
this.viewsDenied = viewsDenied;
}
/**
* @jsp.attribute description="Specify the column width." required="false"
* rtexprvalue="true"
*/
public void setWidth(String width) {
this.width = width;
}
public void setColumnId(String columnId) {
this.columnId = columnId;
}
public void setCellName(String cellName) {
this.cellName = cellName;
}
public void setResizeColWidth(String resizeColWidth) {
this.resizeColWidth = resizeColWidth;
}
public void setEditEvent(String editEvent) {
this.editEvent = editEvent;
}
public void setEditTemplate(String editTemplate) {
this.editTemplate = editTemplate;
}
public void setEditable(String editable) {
this.editable = editable;
}
public void setTipTitle(String tipTitle) {
this.tipTitle = tipTitle;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -