public class MessagesTag
extends javax.servlet.jsp.tagext.BodyTagSupport
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
.Modifier and Type | Field and Description |
---|---|
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.
|
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. |
Constructor and Description |
---|
MessagesTag() |
Modifier and Type | Method and Description |
---|---|
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) |
doInitBody, getBodyContent, getPreviousOut, setBodyContent
findAncestorWithClass, getParent, getValue, getValues, removeValue, setPageContext, setParent, setValue
protected static MessageResources messageResources
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.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.IterationTag
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
Copyright © 2000–2024 Apache Software Foundation. All rights reserved.