FileDocCategorySizeDatePackage
SetTag.javaAPI DocGlassfish v2 API5085Sat May 05 19:17:56 BST 2007org.apache.taglibs.standard.tag.el.core

SetTag

public class SetTag extends org.apache.taglibs.standard.tag.common.core.SetSupport

A handler for <set>, which redirects the browser to a new URL.

author
Shawn Bayern

Fields Summary
private String
value_
private String
target_
private String
property_
Constructors Summary
public SetTag()

        super();
        init();
    
Methods Summary
public intdoStartTag()


        // evaluate any expressions we were passed, once per invocation
        evaluateExpressions();

	// chain to the parent implementation
	return super.doStartTag();
    
private voidevaluateExpressions()

        /* 
         * Note: we don't check for type mismatches here; we assume
         * the expression evaluator will return the expected type
         * (by virtue of knowledge we give it about what that type is).
         * A ClassCastException here is truly unexpected, so we let it
         * propagate up.
         */

	// 'value'
	try {
	    value = ExpressionUtil.evalNotNull(
	        "set", "value", value_, Object.class, this, pageContext);
	} catch (NullAttributeException ex) {
	    // explicitly let 'value' be null
	    value = null;
	}

	// 'target'
	target = ExpressionUtil.evalNotNull(
	    "set", "target", target_, Object.class, this, pageContext);

	// 'property'
	try {
	    property = (String) ExpressionUtil.evalNotNull(
	         "set", "property", property_, String.class, this, pageContext);
        } catch (NullAttributeException ex) {
            // explicitly let 'property' be null
            property = null;
        }
    
private voidinit()

        // null implies "no expression"
	value_ = target_ = property_ = null;
    
public voidrelease()

        super.release();
        init();
    
public voidsetProperty(java.lang.String property_)

        this.property_ = property_;
    
public voidsetTarget(java.lang.String target_)

        this.target_ = target_;
    
public voidsetValue(java.lang.String value_)

        this.value_ = value_;
	this.valueSpecified = true;