1 28 29 package com.caucho.jstl.rt; 30 31 import com.caucho.util.L10N; 32 33 import javax.servlet.jsp.JspException ; 34 import javax.servlet.jsp.tagext.TagSupport ; 35 36 39 public class IfTag extends TagSupport { 40 private static L10N L = new L10N(IfTag.class); 41 42 private boolean _test; 43 private String _var; 44 private String _scope; 45 46 49 public void setTest(boolean test) 50 { 51 _test = test; 52 } 53 54 57 public void setVar(String var) 58 { 59 _var = var; 60 } 61 62 65 public void setScope(String scope) 66 { 67 _scope = scope; 68 } 69 70 73 public int doStartTag() 74 throws JspException 75 { 76 if (_var == null) { 77 } 78 else 79 CoreSetTag.setValue(pageContext, _var, _scope, new Boolean (_test)); 80 81 return _test ? EVAL_BODY_INCLUDE : SKIP_BODY; 82 } 83 } 84 | Popular Tags |