1 18 19 package org.apache.struts.taglib.html; 20 21 import javax.servlet.jsp.JspException ; 22 23 import org.apache.struts.taglib.TagUtils; 24 25 45 public class FrameTag extends LinkTag { 46 47 48 50 51 54 protected String frameborder = null; 55 56 public String getFrameborder() { 57 return (this.frameborder); 58 } 59 60 public void setFrameborder(String frameborder) { 61 this.frameborder = frameborder; 62 } 63 64 65 68 protected String frameName = null; 69 70 public String getFrameName() { 71 return (this.frameName); 72 } 73 74 public void setFrameName(String frameName) { 75 this.frameName = frameName; 76 } 77 78 79 82 protected String longdesc = null; 83 84 public String getLongdesc() { 85 return (this.longdesc); 86 } 87 88 public void setLongdesc(String longdesc) { 89 this.longdesc = longdesc; 90 } 91 92 93 96 protected Integer marginheight = null; 97 98 public Integer getMarginheight() { 99 return (this.marginheight); 100 } 101 102 public void setMarginheight(Integer marginheight) { 103 this.marginheight = marginheight; 104 } 105 106 107 110 protected Integer marginwidth = null; 111 112 public Integer getMarginwidth() { 113 return (this.marginwidth); 114 } 115 116 public void setMarginwidth(Integer marginwidth) { 117 this.marginwidth = marginwidth; 118 } 119 120 121 124 protected boolean noresize = false; 125 126 public boolean getNoresize() { 127 return (this.noresize); 128 } 129 130 public void setNoresize(boolean noresize) { 131 this.noresize = noresize; 132 } 133 134 135 138 protected String scrolling = null; 139 140 public String getScrolling() { 141 return (this.scrolling); 142 } 143 144 public void setScrolling(String scrolling) { 145 this.scrolling = scrolling; 146 } 147 148 149 151 152 157 public int doStartTag() throws JspException { 158 159 StringBuffer results = new StringBuffer ("<frame"); 161 162 prepareAttribute(results, "src", calculateURL()); 163 prepareAttribute(results, "name", getFrameName()); 164 165 if (noresize) { 166 results.append(" noresize=\"noresize\""); 167 } 168 prepareAttribute(results, "scrolling", getScrolling()); 169 prepareAttribute(results, "marginheight", getMarginheight()); 170 prepareAttribute(results, "marginwidth", getMarginwidth()); 171 prepareAttribute(results, "frameborder", getFrameborder()); 172 prepareAttribute(results, "longdesc", getLongdesc()); 173 results.append(prepareStyles()); 174 prepareOtherAttributes(results); 175 results.append(getElementClose()); 176 TagUtils.getInstance().write(pageContext,results.toString()); 177 178 return (SKIP_BODY); 179 180 } 181 182 183 188 public int doEndTag() throws JspException { 189 190 return (EVAL_PAGE); 191 192 } 193 194 195 198 public void release() { 199 200 super.release(); 201 frameborder = null; 202 frameName = null; 203 longdesc = null; 204 marginheight = null; 205 marginwidth = null; 206 noresize = false; 207 scrolling = null; 208 209 } 210 211 212 } 213
| Popular Tags
|