1 16 17 package org.apache.taglibs.standard.tag.el.core; 18 19 import javax.servlet.jsp.JspException ; 20 21 import org.apache.taglibs.standard.tag.common.core.NullAttributeException; 22 import org.apache.taglibs.standard.tag.common.core.SetSupport; 23 24 30 31 public class SetTag extends SetSupport { 32 33 36 private String value_; private String target_; private String property_; 40 41 44 public SetTag() { 45 super(); 46 init(); 47 } 48 49 50 53 public int doStartTag() throws JspException { 55 56 evaluateExpressions(); 58 59 return super.doStartTag(); 61 } 62 63 64 public void release() { 66 super.release(); 67 init(); 68 } 69 70 71 74 public void setValue(String value_) { 75 this.value_ = value_; 76 this.valueSpecified = true; 77 } 78 79 public void setTarget(String target_) { 80 this.target_ = target_; 81 } 82 83 public void setProperty(String property_) { 84 this.property_ = property_; 85 } 86 87 88 91 private void init() { 93 value_ = target_ = property_ = null; 95 } 96 97 98 private void evaluateExpressions() throws JspException { 99 106 107 try { 109 value = ExpressionUtil.evalNotNull( 110 "set", "value", value_, Object .class, this, pageContext); 111 } catch (NullAttributeException ex) { 112 value = null; 114 } 115 116 target = ExpressionUtil.evalNotNull( 118 "set", "target", target_, Object .class, this, pageContext); 119 120 try { 122 property = (String ) ExpressionUtil.evalNotNull( 123 "set", "property", property_, String .class, this, pageContext); 124 } catch (NullAttributeException ex) { 125 property = null; 127 } 128 } 129 } 130 | Popular Tags |