1 18 19 package org.apache.strutsel.taglib.tiles; 20 21 import org.apache.struts.taglib.tiles.InitDefinitionsTag; 22 import javax.servlet.jsp.JspException ; 23 import org.apache.strutsel.taglib.utils.EvalHelper; 24 25 36 public class ELInitDefinitionsTag extends InitDefinitionsTag { 37 38 42 private String fileExpr; 43 47 private String classnameExpr; 48 49 53 public String getFileExpr() { return (fileExpr); } 54 58 public String getClassnameExpr() { return (classnameExpr); } 59 60 64 public void setFileExpr(String fileExpr) { this.fileExpr = fileExpr; } 65 69 public void setClassnameExpr(String classnameExpr) { this.classnameExpr = classnameExpr; } 70 71 74 public void release() 75 { 76 super.release(); 77 setFileExpr(null); 78 setClassnameExpr(null); 79 } 80 81 86 public int doStartTag() throws JspException { 87 evaluateExpressions(); 88 return (super.doStartTag()); 89 } 90 91 97 private void evaluateExpressions() throws JspException { 98 String string = null; 99 100 if ((string = EvalHelper.evalString("file", getFileExpr(), 101 this, pageContext)) != null) 102 setFile(string); 103 if ((string = EvalHelper.evalString("classname", getClassnameExpr(), 104 this, pageContext)) != null) 105 setClassname(string); 106 } 107 } 108 | Popular Tags |