01: package org.gridsphere.provider.portletui.tags;
02:
03: import org.gridsphere.provider.portletui.beans.PortletBean;
04:
05: import javax.servlet.jsp.JspException;
06: import javax.servlet.jsp.JspWriter;
07:
08: /**
09: * The <code>TableRowTag</code> represents a table row element that is conatined within a <code>TableTag</code>
10: * and itself may contain <code>TableCellTag</code>s
11: */
12: public class PortletLinkTag extends DialogTag {
13:
14: protected String theme = "default";
15: protected String renderKit = "brush";
16: protected String portletId = "";
17:
18: public String getTheme() {
19: return theme;
20: }
21:
22: public void setTheme(String theme) {
23: this .theme = theme;
24: }
25:
26: public String getRenderKit() {
27: return renderKit;
28: }
29:
30: public void setRenderKit(String renderKit) {
31: this .renderKit = renderKit;
32: }
33:
34: public String getPortletId() {
35: return portletId;
36: }
37:
38: public void setPortletId(String portletId) {
39: this .portletId = portletId;
40: }
41:
42: public int doStartTag() throws JspException {
43: isLink = true;
44: PortletBean portlet = new PortletBean();
45:
46: setProperties(portlet);
47:
48: portlet.setRenderKit(renderKit);
49: portlet.setTheme(theme);
50: portlet.setPortletId(portletId);
51:
52: JspWriter out;
53: try {
54: out = pageContext.getOut();
55: out.print(portlet.toStartString());
56: } catch (Exception e) {
57: throw new JspException(e);
58: }
59: return SKIP_BODY;
60: }
61:
62: public int doEndTag() throws JspException {
63: return EVAL_PAGE;
64: }
65:
66: }
|