📄 rowtag.java
字号:
package org.extremecomponents.table.tag;import javax.servlet.jsp.JspException;import javax.servlet.jsp.tagext.TagSupport;import org.extremecomponents.table.bean.Attributes;import org.extremecomponents.table.bean.Row;/** * @jsp.tag name="row" display-name="RowTag" body-content="JSP" description="The * container which holds all the row specific information." * * @author Jeff Johnston */public class RowTag extends TagSupport implements ExtendedAttributes { private String onclick; private String onmouseover; private String onmouseout; private String highlightRow; private String highlightClass; private String styleClass; private String style; /** * @jsp.attribute description="The javascript onclick action" * required="false" rtexprvalue="true" */ public String getOnclick() { return TagUtils.evaluateExpressionAsString("onclick", onclick, this, pageContext); } public void setOnclick(String onclick) { this.onclick = onclick; } /** * @jsp.attribute description="The javascript onmouseout action" * required="false" rtexprvalue="true" */ public String getOnmouseout() { return TagUtils.evaluateExpressionAsString("onmouseout", onmouseout, this, pageContext); } public void setOnmouseover(String onmouseover) { this.onmouseover = onmouseover; } /** * @jsp.attribute description="The javascript onmouseover action" * required="false" rtexprvalue="true" */ public String getOnmouseover() { return TagUtils.evaluateExpressionAsString("onmouseover", onmouseover, this, pageContext); } public void setOnmouseout(String onmouseout) { this.onmouseout = onmouseout; } /** * @jsp.attribute description="The css class style sheet." required="false" * rtexprvalue="true" */ public String getStyleClass() { return TagUtils.evaluateExpressionAsString("styleClass", styleClass, this, pageContext); } public void setStyleClass(String styleClass) { this.styleClass = styleClass; } /** * @jsp.attribute description="The css inline style sheet." required="false" * rtexprvalue="true" */ public String getStyle() { return TagUtils.evaluateExpressionAsString("style", style, this, pageContext); } public void setStyle(String style) { this.style = style; } /** * @jsp.attribute description="Used to turn the highlight feature on and * off. The default is false." required="false" * rtexprvalue="true" */ public String getHighlightRow() { String highlightRow = TagUtils.evaluateExpressionAsString("highlightRow", this.highlightRow, this, pageContext); return RowTagUtils.getHighlightRow(TagUtils.getModel(this), highlightRow); } public void setHighlightRow(String showHighlight) { this.highlightRow = showHighlight; } /** * @jsp.attribute description="The css class style sheet." required="false" * rtexprvalue="true" */ public String getHighlightClass() { String highlightClass = TagUtils.evaluateExpressionAsString("highlightClass", this.highlightClass, this, pageContext); return RowTagUtils.getHighlightClass(TagUtils.getModel(this), highlightClass); } public void setHighlightClass(String highlightClass) { this.highlightClass = highlightClass; } public int doStartTag() throws JspException { if (TagUtils.isIteratingBody(this)) { Row row = TagUtils.getModel(this).getRowHandler().getRow(); row.addAttribute(Row.ONCLICK, getOnclick()); row.addAttribute(Row.ONMOUSEOVER, getOnmouseover()); row.addAttribute(Row.ONMOUSEOUT, getOnmouseout()); } else { Row row = new Row(); row.addAttribute(Row.ONCLICK, getOnclick()); row.addAttribute(Row.ONMOUSEOVER, getOnmouseover()); row.addAttribute(Row.ONMOUSEOUT, getOnmouseout()); row.addAttribute(Row.STYLE_CLASS, getStyleClass()); row.addAttribute(Row.STYLE, getStyle()); row.addAttribute(Row.HIGHLIGHT_CLASS, getHighlightClass()); row.addAttribute(Row.HIGHLIGHT_ROW, getHighlightRow()); addExtendedAttributes(row); TagUtils.getModel(this).getRowHandler().addRow(row); } return EVAL_BODY_INCLUDE; } public void addExtendedAttributes(Attributes attributes) throws JspException { }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -