grouptag.java

来自「GridSphere 门户 提供一个基于 portlet 的高级开放源代码门户。」· Java 代码 · 共 75 行

JAVA
75
字号
package org.gridsphere.provider.portletui.tags;import org.gridsphere.provider.portletui.beans.GroupBean;import javax.servlet.jsp.JspException;import javax.servlet.jsp.JspWriter;/* * @author <a href="mailto:oliver.wehrens@aei.mpg.de">Oliver Wehrens</a> * @version $Id: GroupTag.java 4496 2006-02-08 20:27:04Z wehrens $ */public class GroupTag extends BaseComponentTag {    private String label = null;    private String width = null;    private String height = null;    private GroupBean groupBean = null;    public String getLabel() {        return label;    }    public void setLabel(String label) {        this.label = label;    }    public String getWidth() {        return width;    }    public void setWidth(String width) {        this.width = width;    }    public String getHeight() {        return height;    }    public void setHeight(String height) {        this.height = height;    }    public int doStartTag() throws JspException {        groupBean = new GroupBean();        groupBean.setHeight(height);        groupBean.setWidth(width);        groupBean.setLabel(label);        groupBean.setCssClass(cssClass);        groupBean.setCssStyle(cssStyle);        if (key != null) {            groupBean.setLabel(getLocalizedText(key));        }        try {            JspWriter out = pageContext.getOut();            out.print(groupBean.toStartString());        } catch (Exception e) {            throw new JspException(e);        }        return EVAL_BODY_INCLUDE;    }    public int doEndTag() throws JspException {        try {            JspWriter out = pageContext.getOut();            out.print(groupBean.toEndString());        } catch (Exception e) {            throw new JspException(e);        }        return EVAL_PAGE;    }}

⌨️ 快捷键说明

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