FileDocCategorySizeDatePackage
ExprTag.javaAPI DocGlassfish v2 API4793Sat May 05 19:17:58 BST 2007org.apache.taglibs.standard.tag.el.xml

ExprTag

public class ExprTag extends org.apache.taglibs.standard.tag.common.xml.ExprSupport

A handler for <out> that accepts attributes as Strings and evaluates them as expressions at runtime.

author
Shawn Bayern

Fields Summary
private String
escapeXml_
Constructors Summary
public ExprTag()
Constructs a new handler. As with TagSupport, subclasses should not provide other constructors and are expected to call the superclass constructor

        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.
         */

        if (escapeXml_ != null) {
            Boolean b = (Boolean) ExpressionUtil.evalNotNull(
                "out",
                "escapeXml",
                escapeXml_,
                Boolean.class,
                this,
                pageContext);
            if (b == null)
                escapeXml = false;
            else
                escapeXml = b.booleanValue();
        }
    
private voidinit()

        // null implies "no expression"
	escapeXml_ = null;
    
public voidrelease()

        super.release();
        init();
    
public voidsetEscapeXml(java.lang.String escapeXml_)

        this.escapeXml_ = escapeXml_;