1 package com.instantbank.collections.main.web;
2
3
9
10 import javax.servlet.jsp.JspException;
11 import javax.servlet.jsp.tagext.TagSupport;
12 import javax.servlet.http.HttpServletRequest;
13
14 public class TabTag2 extends TagSupport {
15 private boolean disabled = false;
16 private String number;
17 private boolean selected = false;
18 private String title;
19 private String width;
20
21
22 public TabTag2() { }
23
24
25 public int doStartTag() throws JspException {
26 String result;
27 String tabClass = "tabFolder2";
28
29 try {
30 if(selected) {
31 tabClass = "tabFolderSel2";
32 }
33 result = "<td id=\"tab" + number + "right\" align=middle bgcolor=#cccccc valign=top class=\"" + tabClass + "\">";
34
35
36
37
38 result += "<img align=left hspace=0 src=\"/lettertemplate/images/gt_l.gif\" width=6></td>";
39
40 if(disabled) {
41 result += "<td id=\"tab" + number + "\" align=center width=\"" + width + "\" valign=middle class=\"tabFolderDis2\">" + title + "</td>";
42 }
43 else {
44 result += "<td id=\"tab" + number + "\" align=center width=\"" + width + "\" valign=middle class=\"" + tabClass + "\" onClick=\"onTabClicked(this);\">" + title + "</td>";
45 }
46
47 result += "<td id=\"tab" + number + "left\" align=middle bgcolor=#cccccc valign=top class=\"" + tabClass + "\">";
48
49
50
51
52 result += "<img align=right height=18 hspace=0 src=\"/lettertemplate/images/gt_r.gif\" width=6> </td>";
53
54 pageContext.getOut().print(result);
55
56 }
57 catch(Exception e) {
58 throw new JspException(e.getMessage());
59 }
60 return SKIP_BODY;
61 }
62
63
64 public void release() {
65 disabled = false;
66 selected = false;
67 }
68
69
70 public void setDisabled(String disabled) {
71 Boolean b = new Boolean(disabled);
72 this.disabled = b.booleanValue();
73 }
74
75
76 public void setNumber(String number) {
77 this.number = number;
78 }
79
80
81 public void setSelected(String selected) {
82 Boolean b = new Boolean(selected);
83 this.selected = b.booleanValue();
84 }
85
86
87 public void setTitle(String title) {
88 this.title = title;
89 }
90
91
92 public void setWidth(String width) {
93 this.width = width;
94 }
95 }
96
97