1 18 19 package org.apache.strutsel.taglib.html; 20 21 import org.apache.struts.taglib.html.HtmlTag; 22 import javax.servlet.jsp.JspException ; 23 import org.apache.strutsel.taglib.utils.EvalHelper; 24 25 37 public class ELHtmlTag extends HtmlTag { 38 39 43 private String langExpr; 44 48 private String localeExpr; 49 53 private String xhtmlExpr; 54 55 59 public String getLangExpr() { return (langExpr); } 60 64 public String getLocaleExpr() { return (localeExpr); } 65 69 public String getXhtmlExpr() { return (xhtmlExpr); } 70 71 75 public void setLangExpr(String langExpr) { this.langExpr = langExpr; } 76 80 public void setLocaleExpr(String localeExpr) { this.localeExpr = localeExpr; } 81 85 public void setXhtmlExpr(String xhtmlExpr) { this.xhtmlExpr = xhtmlExpr; } 86 87 90 public void release() 91 { 92 super.release(); 93 setLangExpr(null); 94 setLocaleExpr(null); 95 setXhtmlExpr(null); 96 } 97 98 103 public int doStartTag() throws JspException { 104 evaluateExpressions(); 105 return (super.doStartTag()); 106 } 107 108 114 private void evaluateExpressions() throws JspException { 115 Boolean bool = null; 116 String string = null; 117 118 if ((bool = EvalHelper.evalBoolean("lang", getLangExpr(), 119 this, pageContext)) != null) 120 setLang(bool.booleanValue()); 121 122 if ((bool = EvalHelper.evalBoolean("locale", getLocaleExpr(), 123 this, pageContext)) != null) 124 setLocale(bool.booleanValue()); 125 126 if ((bool = EvalHelper.evalBoolean("xhtml", getXhtmlExpr(), 127 this, pageContext)) != null) 128 setXhtml(bool.booleanValue()); 129 } 130 } 131 | Popular Tags |