1 18 19 package org.apache.struts.taglib.html; 20 21 import javax.servlet.jsp.JspException ; 22 import org.apache.struts.util.MessageResources; 23 24 29 public abstract class BaseInputTag extends BaseHandlerTag { 30 31 33 37 protected String cols = null; 38 39 42 protected String maxlength = null; 43 44 47 protected static MessageResources messages = 48 MessageResources.getMessageResources(Constants.Package + ".LocalStrings"); 49 50 53 protected String property = null; 54 55 58 protected String rows = null; 59 60 64 protected String value = null; 65 66 69 protected String name = Constants.BEAN_KEY; 70 71 73 public String getName() { 74 return (this.name); 75 } 76 77 public void setName(String name) { 78 this.name = name; 79 } 80 81 84 public String getCols() { 85 86 return (this.cols); 87 88 } 89 90 95 public void setCols(String cols) { 96 97 this.cols = cols; 98 99 } 100 101 104 public String getMaxlength() { 105 106 return (this.maxlength); 107 108 } 109 110 115 public void setMaxlength(String maxlength) { 116 117 this.maxlength = maxlength; 118 119 } 120 121 124 public String getProperty() { 125 126 return (this.property); 127 128 } 129 130 135 public void setProperty(String property) { 136 137 this.property = property; 138 139 } 140 141 144 public String getRows() { 145 146 return (this.rows); 147 148 } 149 150 155 public void setRows(String rows) { 156 157 this.rows = rows; 158 159 } 160 161 164 public String getSize() { 165 166 return (getCols()); 167 168 } 169 170 175 public void setSize(String size) { 176 177 setCols(size); 178 179 } 180 181 184 public String getValue() { 185 186 return (this.value); 187 188 } 189 190 196 public void setValue(String value) { 197 198 this.value = value; 199 200 } 201 202 204 209 public int doStartTag() throws JspException { 210 211 return (EVAL_BODY_TAG); 212 213 } 214 215 220 public int doEndTag() throws JspException { 221 222 return (EVAL_PAGE); 223 224 } 225 226 230 protected String prepareName() throws JspException { 231 232 if (property == null) { 233 return null; 234 } 235 236 if(indexed) { 238 StringBuffer results = new StringBuffer (); 239 prepareIndex(results, name); 240 results.append(property); 241 return results.toString(); 242 } 243 244 return property; 245 246 } 247 248 251 public void release() { 252 253 super.release(); 254 name = Constants.BEAN_KEY; 255 cols = null; 256 maxlength = null; 257 property = null; 258 rows = null; 259 value = null; 260 261 } 262 263 } 264 | Popular Tags |