1 18 19 package org.apache.strutsel.taglib.tiles; 20 21 import org.apache.struts.taglib.tiles.GetAttributeTag; 22 import javax.servlet.jsp.JspException ; 23 import org.apache.strutsel.taglib.utils.EvalHelper; 24 25 44 public class ELGetAttributeTag extends GetAttributeTag { 45 46 50 private String nameExpr; 51 55 private String ignoreExpr; 56 60 private String roleExpr; 61 62 66 public String getNameExpr() { return (nameExpr); } 67 71 public String getIgnoreExpr() { return (ignoreExpr); } 72 76 public String getRoleExpr() { return (roleExpr); } 77 78 82 public void setNameExpr(String nameExpr) { this.nameExpr = nameExpr; } 83 87 public void setIgnoreExpr(String ignoreExpr) { this.ignoreExpr = ignoreExpr; } 88 92 public void setRoleExpr(String roleExpr) { this.roleExpr = roleExpr; } 93 94 97 public void release() 98 { 99 super.release(); 100 setNameExpr(null); 101 setIgnoreExpr(null); 102 setRoleExpr(null); 103 } 104 105 110 public int doStartTag() throws JspException { 111 evaluateExpressions(); 112 return (super.doStartTag()); 113 } 114 115 121 private void evaluateExpressions() throws JspException { 122 String string = null; 123 Boolean bool = null; 124 125 if ((string = EvalHelper.evalString("name", getNameExpr(), 126 this, pageContext)) != null) 127 setName(string); 128 if ((bool = EvalHelper.evalBoolean("ignore", getIgnoreExpr(), 129 this, pageContext)) != null) 130 setIgnore(bool.booleanValue()); 131 if ((string = EvalHelper.evalString("role", getRoleExpr(), 132 this, pageContext)) != null) 133 setRole(string); 134 } 135 } 136 | Popular Tags |