FileDocCategorySizeDatePackage
BundleTag.javaAPI DocGlassfish v2 API4643Sat May 05 19:17:56 BST 2007org.apache.taglibs.standard.tag.el.fmt

BundleTag

public class BundleTag extends org.apache.taglibs.standard.tag.common.fmt.BundleSupport

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

author
Shawn Bayern
author
Jan Luehe

Fields Summary
private String
basename_
private String
prefix_
Constructors Summary
public BundleTag()
Constructs a new BundleTag. 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()


	// 'basename' attribute (mandatory)
	basename = (String) ExpressionEvaluatorManager.evaluate(
	    "basename", basename_, String.class, this, pageContext);

	// 'prefix' attribute (optional)
	if (prefix_ != null) {
	    prefix = (String) ExpressionEvaluatorManager.evaluate(
	        "prefix", prefix_, String.class, this, pageContext);
	}
    
private voidinit()

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

        super.release();
        init();
    
public voidsetBasename(java.lang.String basename_)

        this.basename_ = basename_;
    
public voidsetPrefix(java.lang.String prefix_)

        this.prefix_ = prefix_;