FileDocCategorySizeDatePackage
ParamSupport.javaAPI DocGlassfish v2 API4086Sat May 05 19:17:52 BST 2007org.apache.taglibs.standard.tag.common.fmt

ParamSupport

public abstract class ParamSupport extends javax.servlet.jsp.tagext.BodyTagSupport
Support for tag handlers for <param>, the message argument subtag in JSTL 1.0 which supplies an argument for parametric replacement to its parent <message> tag.
see
MessageSupport
author
Jan Luehe

Fields Summary
protected Object
value
protected boolean
valueSpecified
Constructors Summary
public ParamSupport()

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

	Tag t = findAncestorWithClass(this, MessageSupport.class);
	if (t == null) {
	    throw new JspTagException(Resources.getMessage(
                            "PARAM_OUTSIDE_MESSAGE"));
	}
	MessageSupport parent = (MessageSupport) t;

	/*
	 * Get argument from 'value' attribute or body, as appropriate, and
	 * add it to enclosing <fmt:message> tag, even if it is null or equal
	 * to "".
	 */
	Object input = null;
        // determine the input by...
	if (valueSpecified) {
	    // ... reading 'value' attribute
	    input = value;
	} else {
	    // ... retrieving and trimming our body (TLV has ensured that it's
	    // non-empty)
	    input = bodyContent.getString().trim();
	}
	parent.addParam(input);

	return EVAL_PAGE;
    
private voidinit()

	value = null;
	valueSpecified = false;
    
public voidrelease()

	init();