1 18 19 package org.apache.strutsel.taglib.bean; 20 21 import javax.servlet.jsp.JspException ; 22 23 import org.apache.struts.taglib.bean.MessageTag; 24 import org.apache.strutsel.taglib.utils.EvalHelper; 25 26 40 public class ELMessageTag extends MessageTag { 41 42 46 private String arg0Expr; 47 51 private String arg1Expr; 52 56 private String arg2Expr; 57 61 private String arg3Expr; 62 66 private String arg4Expr; 67 71 private String bundleExpr; 72 76 private String keyExpr; 77 81 private String localeExpr; 82 86 private String nameExpr; 87 91 private String propertyExpr; 92 96 private String scopeExpr; 97 98 102 public String getArg0Expr() { return (arg0Expr); } 103 107 public String getArg1Expr() { return (arg1Expr); } 108 112 public String getArg2Expr() { return (arg2Expr); } 113 117 public String getArg3Expr() { return (arg3Expr); } 118 122 public String getArg4Expr() { return (arg4Expr); } 123 127 public String getBundleExpr() { return (bundleExpr); } 128 132 public String getKeyExpr() { return (keyExpr); } 133 137 public String getLocaleExpr() { return (localeExpr); } 138 142 public String getNameExpr() { return (nameExpr); } 143 147 public String getPropertyExpr() { return (propertyExpr); } 148 152 public String getScopeExpr() { return (scopeExpr); } 153 154 158 public void setArg0Expr(String arg0Expr) { this.arg0Expr = arg0Expr; } 159 163 public void setArg1Expr(String arg1Expr) { this.arg1Expr = arg1Expr; } 164 168 public void setArg2Expr(String arg2Expr) { this.arg2Expr = arg2Expr; } 169 173 public void setArg3Expr(String arg3Expr) { this.arg3Expr = arg3Expr; } 174 178 public void setArg4Expr(String arg4Expr) { this.arg4Expr = arg4Expr; } 179 183 public void setBundleExpr(String bundleExpr) { this.bundleExpr = bundleExpr; } 184 188 public void setKeyExpr(String keyExpr) { this.keyExpr = keyExpr; } 189 193 public void setLocaleExpr(String localeExpr) { this.localeExpr = localeExpr; } 194 198 public void setNameExpr(String nameExpr) { this.nameExpr = nameExpr; } 199 203 public void setPropertyExpr(String propertyExpr) { this.propertyExpr = propertyExpr; } 204 208 public void setScopeExpr(String scopeExpr) { this.scopeExpr = scopeExpr; } 209 210 213 public void release() 214 { 215 super.release(); 216 setArg0Expr(null); 217 setArg1Expr(null); 218 setArg2Expr(null); 219 setArg3Expr(null); 220 setArg4Expr(null); 221 setBundleExpr(null); 222 setKeyExpr(null); 223 setLocaleExpr(null); 224 setNameExpr(null); 225 setPropertyExpr(null); 226 setScopeExpr(null); 227 } 228 229 234 public int doStartTag() throws JspException { 235 evaluateExpressions(); 236 return (super.doStartTag()); 237 } 238 239 245 private void evaluateExpressions() throws JspException { 246 String string = null; 247 248 249 if ((string = EvalHelper.evalString("arg0", getArg0Expr(), 250 this, pageContext)) != null) 251 setArg0(string); 252 253 if ((string = EvalHelper.evalString("arg1", getArg1Expr(), 254 this, pageContext)) != null) 255 setArg1(string); 256 257 if ((string = EvalHelper.evalString("arg2", getArg2Expr(), 258 this, pageContext)) != null) 259 setArg2(string); 260 261 if ((string = EvalHelper.evalString("arg3", getArg3Expr(), 262 this, pageContext)) != null) 263 setArg3(string); 264 265 if ((string = EvalHelper.evalString("arg4", getArg4Expr(), 266 this, pageContext)) != null) 267 setArg4(string); 268 269 if ((string = EvalHelper.evalString("bundle", getBundleExpr(), 270 this, pageContext)) != null) 271 setBundle(string); 272 273 if ((string = EvalHelper.evalString("key", getKeyExpr(), 274 this, pageContext)) != null) 275 setKey(string); 276 277 if ((string = EvalHelper.evalString("locale", getLocaleExpr(), 278 this, pageContext)) != null) 279 setLocale(string); 280 281 if ((string = EvalHelper.evalString("name", getNameExpr(), 282 this, pageContext)) != null) 283 setName(string); 284 285 if ((string = EvalHelper.evalString("property", getPropertyExpr(), 286 this, pageContext)) != null) 287 setProperty(string); 288 289 if ((string = EvalHelper.evalString("scope", getScopeExpr(), 290 this, pageContext)) != null) 291 setScope(string); 292 } 293 } 294 | Popular Tags |