1 18 19 package org.apache.strutsel.taglib.bean; 20 21 import org.apache.struts.taglib.bean.StrutsTag; 22 import javax.servlet.jsp.JspException ; 23 import org.apache.strutsel.taglib.utils.EvalHelper; 24 25 37 public class ELStrutsTag extends StrutsTag { 38 39 43 private String idExpr; 44 48 private String formBeanExpr; 49 53 private String forwardExpr; 54 58 private String mappingExpr; 59 60 64 public String getIdExpr() { return (idExpr); } 65 69 public String getFormBeanExpr() { return (formBeanExpr); } 70 74 public String getForwardExpr() { return (forwardExpr); } 75 79 public String getMappingExpr() { return (mappingExpr); } 80 81 85 public void setIdExpr(String idExpr) { this.idExpr = idExpr; } 86 90 public void setFormBeanExpr(String formBeanExpr) { this.formBeanExpr = formBeanExpr; } 91 95 public void setForwardExpr(String forwardExpr) { this.forwardExpr = forwardExpr; } 96 100 public void setMappingExpr(String mappingExpr) { this.mappingExpr = mappingExpr; } 101 102 105 public void release() 106 { 107 super.release(); 108 setIdExpr(null); 109 setFormBeanExpr(null); 110 setForwardExpr(null); 111 setMappingExpr(null); 112 } 113 114 119 public int doStartTag() throws JspException { 120 evaluateExpressions(); 121 return (super.doStartTag()); 122 } 123 124 130 private void evaluateExpressions() throws JspException { 131 String string = null; 132 133 if ((string = EvalHelper.evalString("id", getIdExpr(), 134 this, pageContext)) != null) 135 setId(string); 136 137 if ((string = EvalHelper.evalString("formBean", getFormBeanExpr(), 138 this, pageContext)) != null) 139 setFormBean(string); 140 141 if ((string = EvalHelper.evalString("forward", getForwardExpr(), 142 this, pageContext)) != null) 143 setForward(string); 144 145 if ((string = EvalHelper.evalString("mapping", getMappingExpr(), 146 this, pageContext)) != null) 147 setMapping(string); 148 } 149 } 150 | Popular Tags |