1 18 19 package org.apache.strutsel.taglib.bean; 20 21 import org.apache.struts.taglib.bean.ResourceTag; 22 import javax.servlet.jsp.JspException ; 23 import org.apache.strutsel.taglib.utils.EvalHelper; 24 25 37 public class ELResourceTag extends ResourceTag { 38 39 43 private String idExpr; 44 48 private String inputExpr; 49 53 private String nameExpr; 54 55 59 public String getIdExpr() { return (idExpr); } 60 64 public String getInputExpr() { return (inputExpr); } 65 69 public String getNameExpr() { return (nameExpr); } 70 71 75 public void setIdExpr(String idExpr) { this.idExpr = idExpr; } 76 80 public void setInputExpr(String inputExpr) { this.inputExpr = inputExpr; } 81 85 public void setNameExpr(String nameExpr) { this.nameExpr = nameExpr; } 86 87 90 public void release() 91 { 92 super.release(); 93 setIdExpr(null); 94 setInputExpr(null); 95 setNameExpr(null); 96 } 97 98 103 public int doStartTag() throws JspException { 104 evaluateExpressions(); 105 return (super.doStartTag()); 106 } 107 108 114 private void evaluateExpressions() throws JspException { 115 String string = null; 116 117 if ((string = EvalHelper.evalString("id", getIdExpr(), 118 this, pageContext)) != null) 119 setId(string); 120 121 if ((string = EvalHelper.evalString("input", getInputExpr(), 122 this, pageContext)) != null) 123 setInput(string); 124 125 if ((string = EvalHelper.evalString("name", getNameExpr(), 126 this, pageContext)) != null) 127 setName(string); 128 } 129 } 130 | Popular Tags |