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

SetLocaleTag

public class SetLocaleTag extends org.apache.taglibs.standard.tag.common.fmt.SetLocaleSupport

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

author
Jan Luehe

Fields Summary
private String
value_
private String
variant_
Constructors Summary
public SetLocaleTag()
Constructs a new LocaleTag. 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()


	// 'value' attribute (mandatory)
	value = ExpressionEvaluatorManager.evaluate(
	    "value", value_, Object.class, this, pageContext);

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

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

        super.release();
        init();
    
public voidsetValue(java.lang.String value_)

        this.value_ = value_;
    
public voidsetVariant(java.lang.String variant_)

        this.variant_ = variant_;