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;