jp.terasoluna.fw.web.struts.taglib
Class MessagesTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.apache.struts.taglib.html.MessagesTag
jp.terasoluna.fw.web.struts.taglib.MessagesTag
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
public class MessagesTag
- extends org.apache.struts.taglib.html.MessagesTag
Displays action messages on pop-up screen.
Extends MessagesTag
of Struts
, transfers the
message information which is poped-up with <ts:messagePopup>
tag
from session to request. Deletes the information from the session.
* Please note that it differs from the MessagesTag function of TERASOLUNA1.1.x.
Message information displayed on pop-up screen is not deleted from the session unless this tag is used.
Attribute supported by tag
In MessagesTag
, following attributes are supported.
Attribute name |
Default value |
Required |
Execution time format |
Overview |
id |
- |
true |
false |
bean name where message is to be stored.
|
bundle |
- |
false |
true |
Specifies the message resource name. When it is not specified, default message resource is used.
|
locale |
- |
false |
true |
Specifies locale of output message.
When it is not specified, default locale is used.
|
name |
- |
false |
true |
Specifies the message key of action message separately.
When the value of message attribute is specified as "true",
Globals.MESSAGE_KEY is always set.
When it is not set, Globals.ERROR_KEY is set.
|
property |
- |
false |
true |
Specifies the property name which is displayed (form).
When it is not specified,all action messages are displayed irrespective of property name.
|
header |
- |
false |
true |
Specifies the header message key which is output before message list.
|
footer |
- |
false |
true |
Specifies the footer message key which is output after message list.
|
message |
- |
false |
true |
When value is secified as "true" , name
attribute is set with Globals.MESSAGE_KEY .
|
Scripting variable of custom tag
There is no scripting variable set by this tag.
How to use
It can be referred from internal tag by using the bean
name which is specified in
id
attribute of <ts:messages>
.
<ts:messages id="msg" bundle="sampleResources"
message="true">
<bean:write name="msg"/>
</ts:messages>
- See Also:
- Serialized Form
Fields inherited from class org.apache.struts.taglib.html.MessagesTag |
bundle, footer, header, id, iterator, locale, message, messageResources, name, processed, property |
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
bodyContent |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
EVAL_BODY_AGAIN |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Method Summary |
int |
doStartTag()
Transfers the message information which is stored in the session to the request and
performs the display process of error information on the pop-up screen. |
Methods inherited from class org.apache.struts.taglib.html.MessagesTag |
doAfterBody, doEndTag, getBundle, getFooter, getHeader, getId, getLocale, getMessage, getName, getProperty, release, setBundle, setFooter, setHeader, setId, setLocale, setMessage, setName, setProperty |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
doInitBody, getBodyContent, getPreviousOut, setBodyContent |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
findAncestorWithClass, getParent, getValue, getValues, removeValue, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.jsp.tagext.Tag |
getParent, setPageContext, setParent |
serialVersionUID
private static final long serialVersionUID
- serial version ID
- See Also:
- Constant Field Values
MessagesTag
public MessagesTag()
doStartTag
public int doStartTag()
throws javax.servlet.jsp.JspException
- Transfers the message information which is stored in the session to the request and performs the display process of message information on the pop-up screen.
- Specified by:
doStartTag
in interface javax.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in class org.apache.struts.taglib.html.MessagesTag
- Returns:
- Process result status
- Throws:
javax.servlet.jsp.JspException
- JSP exception