1 18 19 package org.apache.strutsel.taglib.tiles; 20 21 import org.apache.struts.taglib.tiles.GetTag; 22 import javax.servlet.jsp.JspException ; 23 import org.apache.strutsel.taglib.utils.EvalHelper; 24 25 44 public class ELGetTag extends GetTag { 45 46 50 private String nameExpr; 51 55 private String ignoreExpr; 56 60 private String flushExpr; 61 65 private String roleExpr; 66 67 71 public String getNameExpr() { return (nameExpr); } 72 76 public String getIgnoreExpr() { return (ignoreExpr); } 77 81 public String getFlushExpr() { return (flushExpr); } 82 86 public String getRoleExpr() { return (roleExpr); } 87 88 92 public void setNameExpr(String nameExpr) { this.nameExpr = nameExpr; } 93 97 public void setIgnoreExpr(String ignoreExpr) { this.ignoreExpr = ignoreExpr; } 98 102 public void setFlushExpr(String flushExpr) { this.flushExpr = flushExpr; } 103 107 public void setRoleExpr(String roleExpr) { this.roleExpr = roleExpr; } 108 109 112 public void release() 113 { 114 super.release(); 115 setNameExpr(null); 116 setIgnoreExpr(null); 117 setFlushExpr(null); 118 setRoleExpr(null); 119 } 120 121 126 public int doStartTag() throws JspException { 127 evaluateExpressions(); 128 return (super.doStartTag()); 129 } 130 131 137 private void evaluateExpressions() throws JspException { 138 String string = null; 139 Boolean bool = null; 140 141 if ((string = EvalHelper.evalString("name", getNameExpr(), 142 this, pageContext)) != null) 143 setName(string); 144 if ((bool = EvalHelper.evalBoolean("ignore", getIgnoreExpr(), 145 this, pageContext)) != null) 146 setIgnore(bool.booleanValue()); 147 if ((string = EvalHelper.evalString("flush", getFlushExpr(), 148 this, pageContext)) != null) 149 setFlush(string); 150 if ((string = EvalHelper.evalString("role", getRoleExpr(), 151 this, pageContext)) != null) 152 setRole(string); 153 } 154 } 155 | Popular Tags |