|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.servlet.jsp.tagext.TagSupport | +--javax.servlet.jsp.tagext.BodyTagSupport | +--org.apache.struts.taglib.html.MessagesTag
Custom tag that iterates the elements of a message collection.
It defaults to retrieving the messages from Globals.ERROR_KEY
,
but if the message attribute is set to true then the messages will be
retrieved from Globals.MESSAGE_KEY
. This is an alternative
to the default ErrorsTag
.
Field Summary | |
protected java.lang.String |
bundle
The servlet context attribute key for our resources. |
protected java.lang.String |
footer
The message resource key for errors footer. |
protected java.lang.String |
header
The message resource key for errors header. |
protected java.lang.String |
id
The name of the scripting variable to be exposed. |
protected java.util.Iterator |
iterator
Iterator of the elements of this error collection, while we are actually running. |
protected java.lang.String |
locale
The session attribute key for our locale. |
private static org.apache.commons.logging.Log |
log
Commons Logging instance. |
protected java.lang.String |
message
If this is set to 'true', then the Globals.MESSAGE_KEY will
be used to retrieve the messages from scope. |
protected static MessageResources |
messageResources
The message resources for this package. |
protected java.lang.String |
name
The request attribute key for our error messages (if any). |
protected boolean |
processed
Whether or not any error messages have been processed. |
protected java.lang.String |
property
The name of the property for which error messages should be returned, or null to return all errors. |
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_TAG |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary | |
MessagesTag()
|
Method Summary | |
int |
doAfterBody()
Make the next collection element available and loop, or finish the iterations if there are no more elements. |
int |
doEndTag()
Clean up after processing this enumeration. |
int |
doStartTag()
Construct an iterator for the specified collection, and begin looping through the body once per element. |
java.lang.String |
getBundle()
|
java.lang.String |
getFooter()
|
java.lang.String |
getHeader()
|
java.lang.String |
getId()
|
java.lang.String |
getLocale()
|
java.lang.String |
getMessage()
|
java.lang.String |
getName()
|
java.lang.String |
getProperty()
|
void |
release()
Release all allocated resources. |
void |
setBundle(java.lang.String bundle)
|
void |
setFooter(java.lang.String footer)
|
void |
setHeader(java.lang.String header)
|
void |
setId(java.lang.String id)
|
void |
setLocale(java.lang.String locale)
|
void |
setMessage(java.lang.String message)
|
void |
setName(java.lang.String name)
|
void |
setProperty(java.lang.String property)
|
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 |
Field Detail |
protected static MessageResources messageResources
private static org.apache.commons.logging.Log log
protected java.util.Iterator iterator
protected boolean processed
protected java.lang.String id
protected java.lang.String bundle
protected java.lang.String locale
protected java.lang.String name
protected java.lang.String property
null
to return all errors.
protected java.lang.String header
protected java.lang.String footer
protected java.lang.String message
Globals.MESSAGE_KEY
will
be used to retrieve the messages from scope.
Constructor Detail |
public MessagesTag()
Method Detail |
public java.lang.String getId()
getId
in class javax.servlet.jsp.tagext.TagSupport
public void setId(java.lang.String id)
setId
in class javax.servlet.jsp.tagext.TagSupport
public java.lang.String getBundle()
public void setBundle(java.lang.String bundle)
public java.lang.String getLocale()
public void setLocale(java.lang.String locale)
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getProperty()
public void setProperty(java.lang.String property)
public java.lang.String getHeader()
public void setHeader(java.lang.String header)
public java.lang.String getFooter()
public void setFooter(java.lang.String footer)
public java.lang.String getMessage()
public void setMessage(java.lang.String message)
public int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.BodyTagSupport
javax.servlet.jsp.JspException
- if a JSP exception has occurredpublic int doAfterBody() throws javax.servlet.jsp.JspException
doAfterBody
in interface javax.servlet.jsp.tagext.BodyTag
doAfterBody
in class javax.servlet.jsp.tagext.BodyTagSupport
javax.servlet.jsp.JspException
- if a JSP exception has occurredpublic int doEndTag() throws javax.servlet.jsp.JspException
doEndTag
in interface javax.servlet.jsp.tagext.Tag
doEndTag
in class javax.servlet.jsp.tagext.BodyTagSupport
javax.servlet.jsp.JspException
- if a JSP exception has occurredpublic void release()
release
in interface javax.servlet.jsp.tagext.Tag
release
in class javax.servlet.jsp.tagext.BodyTagSupport
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |