1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.struts.taglib.html;
22
23 import org.apache.struts.taglib.TagUtils;
24
25 import javax.servlet.jsp.JspException;
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46 public class FrameTag extends LinkTag {
47
48
49
50
51
52 protected String frameborder = null;
53
54
55
56
57
58 protected String frameName = null;
59
60
61
62
63 protected String longdesc = null;
64
65
66
67
68 protected Integer marginheight = null;
69
70
71
72
73 protected Integer marginwidth = null;
74
75
76
77
78 protected boolean noresize = false;
79
80
81
82
83 protected String scrolling = null;
84
85 public String getFrameborder() {
86 return (this.frameborder);
87 }
88
89 public void setFrameborder(String frameborder) {
90 this.frameborder = frameborder;
91 }
92
93 public String getFrameName() {
94 return (this.frameName);
95 }
96
97 public void setFrameName(String frameName) {
98 this.frameName = frameName;
99 }
100
101 public String getLongdesc() {
102 return (this.longdesc);
103 }
104
105 public void setLongdesc(String longdesc) {
106 this.longdesc = longdesc;
107 }
108
109 public Integer getMarginheight() {
110 return (this.marginheight);
111 }
112
113 public void setMarginheight(Integer marginheight) {
114 this.marginheight = marginheight;
115 }
116
117 public Integer getMarginwidth() {
118 return (this.marginwidth);
119 }
120
121 public void setMarginwidth(Integer marginwidth) {
122 this.marginwidth = marginwidth;
123 }
124
125 public boolean getNoresize() {
126 return (this.noresize);
127 }
128
129 public void setNoresize(boolean noresize) {
130 this.noresize = noresize;
131 }
132
133 public String getScrolling() {
134 return (this.scrolling);
135 }
136
137 public void setScrolling(String scrolling) {
138 this.scrolling = scrolling;
139 }
140
141
142
143
144
145
146
147
148 public int doEndTag() throws JspException {
149
150 StringBuffer results = new StringBuffer("<frame");
151
152 prepareAttribute(results, "src", calculateURL());
153 prepareAttribute(results, "name", getFrameName());
154
155 if (noresize) {
156 results.append(" noresize=\"noresize\"");
157 }
158
159 prepareAttribute(results, "scrolling", getScrolling());
160 prepareAttribute(results, "marginheight", getMarginheight());
161 prepareAttribute(results, "marginwidth", getMarginwidth());
162 prepareAttribute(results, "frameborder", getFrameborder());
163 prepareAttribute(results, "longdesc", getLongdesc());
164 results.append(prepareStyles());
165 prepareOtherAttributes(results);
166 results.append(getElementClose());
167 TagUtils.getInstance().write(pageContext, results.toString());
168
169 return (EVAL_PAGE);
170 }
171
172
173
174
175 public void release() {
176 super.release();
177 frameborder = null;
178 frameName = null;
179 longdesc = null;
180 marginheight = null;
181 marginwidth = null;
182 noresize = false;
183 scrolling = null;
184 }
185 }