01: package org.gridsphere.provider.portletui.tags;
02:
03: import org.gridsphere.provider.portletui.beans.GroupBean;
04:
05: import javax.servlet.jsp.JspException;
06: import javax.servlet.jsp.JspWriter;
07:
08: /*
09: * @author <a href="mailto:oliver.wehrens@aei.mpg.de">Oliver Wehrens</a>
10: * @version $Id: GroupTag.java 6385 2007-10-25 14:02:26Z wehrens $
11: */
12:
13: public class GroupTag extends BaseComponentTag {
14:
15: private String label = null;
16: private String width = null;
17: private String height = null;
18: private GroupBean groupBean = null;
19:
20: public String getLabel() {
21: return label;
22: }
23:
24: public void setLabel(String label) {
25: this .label = label;
26: }
27:
28: public String getWidth() {
29: return width;
30: }
31:
32: public void setWidth(String width) {
33: this .width = width;
34: }
35:
36: public String getHeight() {
37: return height;
38: }
39:
40: public void setHeight(String height) {
41: this .height = height;
42: }
43:
44: public int doStartTag() throws JspException {
45: groupBean = new GroupBean();
46: groupBean.setHeight(height);
47: groupBean.setWidth(width);
48: groupBean.setLabel(label);
49: groupBean.setCssClass(cssClass);
50: groupBean.setCssStyle(cssStyle);
51: if (key != null) {
52: groupBean.setLabel(getLocalizedText(key));
53: }
54:
55: try {
56: JspWriter out = pageContext.getOut();
57: out.print(groupBean.toStartString());
58: } catch (Exception e) {
59: throw new JspException(e);
60: }
61: return EVAL_BODY_INCLUDE;
62: }
63:
64: public int doEndTag() throws JspException {
65: try {
66: JspWriter out = pageContext.getOut();
67: out.print(groupBean.toEndString());
68: } catch (Exception e) {
69: throw new JspException(e);
70: }
71: return EVAL_PAGE;
72: }
73:
74: }
|