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 String |
bundle
The servlet context attribute key for our resources.
|
protected String |
footer
The message resource key for errors footer.
|
protected String |
header
The message resource key for errors header.
|
protected String |
id
The name of the scripting variable to be exposed.
|
protected Iterator |
iterator
Iterator of the elements of this error collection, while we are
actually running.
|
protected String |
locale
The session attribute key for our locale.
|
protected 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 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 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.
|
String |
getBundle() |
String |
getFooter() |
String |
getHeader() |
String |
getId() |
String |
getLocale() |
String |
getMessage() |
String |
getName() |
String |
getProperty() |
void |
release()
Release all allocated resources.
|
void |
setBundle(String bundle) |
void |
setFooter(String footer) |
void |
setHeader(String header) |
void |
setId(String id) |
void |
setLocale(String locale) |
void |
setMessage(String message) |
void |
setName(String name) |
void |
setProperty(String property) |
doInitBody, getBodyContent, getPreviousOut, setBodyContent
findAncestorWithClass, getParent, getValue, getValues, removeValue, setPageContext, setParent, setValue
protected static MessageResources messageResources
protected Iterator iterator
protected boolean processed
protected String id
protected String bundle
protected String locale
protected String name
protected String property
null
to return all errors.protected String header
protected String footer
protected String message
Globals.MESSAGE_KEY
will be used to retrieve the messages from scope.public String getId()
getId
in class javax.servlet.jsp.tagext.TagSupport
public void setId(String id)
setId
in class javax.servlet.jsp.tagext.TagSupport
public String getBundle()
public void setBundle(String bundle)
public String getLocale()
public void setLocale(String locale)
public String getName()
public void setName(String name)
public String getProperty()
public void setProperty(String property)
public String getHeader()
public void setHeader(String header)
public String getFooter()
public void setFooter(String footer)
public String getMessage()
public void setMessage(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–2017 Apache Software Foundation. All rights reserved.