1 18 19 package org.apache.strutsel.taglib.bean; 20 21 import org.apache.struts.taglib.bean.IncludeTag; 22 import javax.servlet.jsp.JspException ; 23 import org.apache.strutsel.taglib.utils.EvalHelper; 24 25 36 public class ELIncludeTag extends IncludeTag { 37 38 42 private String anchorExpr; 43 47 private String forwardExpr; 48 52 private String hrefExpr; 53 57 private String idExpr; 58 62 private String nameExpr; 63 67 private String pageExpr; 68 72 private String transactionExpr; 73 74 78 public String getAnchorExpr() { return (anchorExpr); } 79 83 public String getForwardExpr() { return (forwardExpr); } 84 88 public String getHrefExpr() { return (hrefExpr); } 89 93 public String getIdExpr() { return (idExpr); } 94 98 public String getNameExpr() { return (nameExpr); } 99 103 public String getPageExpr() { return (pageExpr); } 104 108 public String getTransactionExpr() { return (transactionExpr); } 109 110 114 public void setAnchorExpr(String anchorExpr) { this.anchorExpr = anchorExpr; } 115 119 public void setForwardExpr(String forwardExpr) { this.forwardExpr = forwardExpr; } 120 124 public void setHrefExpr(String hrefExpr) { this.hrefExpr = hrefExpr; } 125 129 public void setIdExpr(String idExpr) { this.idExpr = idExpr; } 130 134 public void setNameExpr(String nameExpr) { this.nameExpr = nameExpr; } 135 139 public void setPageExpr(String pageExpr) { this.pageExpr = pageExpr; } 140 144 public void setTransactionExpr(String transactionExpr) { this.transactionExpr = transactionExpr; } 145 146 149 public void release() 150 { 151 super.release(); 152 setAnchorExpr(null); 153 setForwardExpr(null); 154 setHrefExpr(null); 155 setIdExpr(null); 156 setNameExpr(null); 157 setPageExpr(null); 158 setTransactionExpr(null); 159 } 160 161 166 public int doStartTag() throws JspException { 167 evaluateExpressions(); 168 return (super.doStartTag()); 169 } 170 171 177 private void evaluateExpressions() throws JspException { 178 String string = null; 179 Boolean bool = null; 180 181 if ((string = EvalHelper.evalString("anchor", getAnchorExpr(), 182 this, pageContext)) != null) 183 setAnchor(string); 184 185 if ((string = EvalHelper.evalString("forward", getForwardExpr(), 186 this, pageContext)) != null) 187 setForward(string); 188 189 if ((string = EvalHelper.evalString("href", getHrefExpr(), 190 this, pageContext)) != null) 191 setHref(string); 192 193 if ((string = EvalHelper.evalString("id", getIdExpr(), 194 this, pageContext)) != null) 195 setId(string); 196 197 if ((string = EvalHelper.evalString("name", getNameExpr(), 198 this, pageContext)) != null) 199 setName(string); 200 201 if ((string = EvalHelper.evalString("page", getPageExpr(), 202 this, pageContext)) != null) 203 setPage(string); 204 205 if ((bool = EvalHelper.evalBoolean("transaction", getTransactionExpr(), 206 this, pageContext)) != null) 207 setTransaction(bool.booleanValue()); 208 } 209 } 210 | Popular Tags |