org.apache.beehive.netui.tags.databinding.message
Class Message
Object
TagSupport
BodyTagSupport
AbstractClassicTag
Message
- All Implemented Interfaces:
- Serializable, BodyTag, IterationTag, JspTag, Tag, INetuiTag
public class Message
- extends AbstractClassicTag
Tag handler class for the <netui-data:message> tag. Provides a message schema, which can be parameterized with message content.
- See Also:
- Serialized Form
- Example
- Defines a message schema, while the
MessageArg
tags
provide the parameters that plug values into the schema.
In the following example, the <netui-data:message> tag
uses the value
attribute to bind to the message schema (which
was earlier added to the
javax.servlet.jsp.PageContext
object.
The two <netui-data:messageArg> tags provide the parameters to plug into the
schema.
<%
pageContext.setAttribute("msgSkeleton", new String("To read about {0}, go to {1}."));
%>
...
<netui-data:message value="{pageContext.msgSkeleton}" resultId="message">
<netui-data:messageArg value="messaging"/>
<netui-data:messageArg value="my web page"/>
</netui-data:message>
...
<netui:label value="{pageContext.message}"/>
The following message is output to the JSP page:
To read about messaging, go to my web page.
Fields inherited from class BodyTagSupport |
bodyContent |
Fields inherited from class TagSupport |
id, pageContext |
Fields inherited from interface BodyTag |
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
Fields inherited from interface IterationTag |
EVAL_BODY_AGAIN |
Fields inherited from interface Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Methods inherited from class AbstractClassicTag |
applyNamingChain, getErrorsReport, getIdForTagId, getNamingChain, getNextId, getScriptReporter, getUserLocale, hasErrors, qualifyAttribute, registerTagError, registerTagError, reportAndExit, reportErrors, rewriteName, setNonEmptyValueAttribute, setRequiredValueAttribute, write |
Methods inherited from class BodyTagSupport |
doAfterBody, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent |
Methods inherited from class TagSupport |
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface Tag |
getParent, setPageContext, setParent |
MESSAGE_ARG_KEY
public static final String MESSAGE_ARG_KEY
- See Also:
- Constant Field Values
Message
public Message()
getTagName
public String getTagName()
- Description copied from class:
AbstractClassicTag
- Return the name of the tag. Used by error reporting to get the name of the tag.
- Specified by:
getTagName
in interface INetuiTag
- Specified by:
getTagName
in class AbstractClassicTag
- Returns:
- the name of the tag.
setResultId
public void setResultId(String resultId)
setValue
public void setValue(Object value)
doStartTag
public int doStartTag()
- Specified by:
doStartTag
in interface Tag
- Overrides:
doStartTag
in class BodyTagSupport
doEndTag
public int doEndTag()
throws JspException
- Specified by:
doEndTag
in interface Tag
- Overrides:
doEndTag
in class BodyTagSupport
- Throws:
JspException
addMessageArgument
public void addMessageArgument(Object messageArgument)
localRelease
protected void localRelease()
- Description copied from class:
AbstractClassicTag
- This is a method that will reinitialize all temporary state on a
tag and should be called in the doEndTag method.
- Overrides:
localRelease
in class AbstractClassicTag