|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.jsp.tagext.TagSupport org.apache.struts.taglib.html.ErrorsTag
public class ErrorsTag
Custom tag that renders error messages if an appropriate request attribute
has been created. The tag looks for a request attribute with a reserved
key, and assumes that it is either a String, a String array, containing
message keys to be looked up in the module's MessageResources, or an object
of type org.apache.struts.action.ActionErrors
.
The following optional message keys will be utilized if corresponding messages exist for them in the application resources:
Field Summary | |
---|---|
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 |
locale
The session attribute key for our locale. |
protected static MessageResources |
messages
The message resources for this package. |
protected String |
name
The request attribute key for our error messages (if any). |
protected String |
prefix
The message resource key for errors prefix. |
protected String |
property
The name of the property for which error messages should be returned, or null to return all errors. |
protected String |
suffix
The message resource key for errors suffix. |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
id, pageContext |
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 |
Constructor Summary | |
---|---|
ErrorsTag()
|
Method Summary | |
---|---|
int |
doStartTag()
Render the specified error messages if there are any. |
String |
getBundle()
|
String |
getFooter()
|
String |
getHeader()
|
String |
getLocale()
|
String |
getName()
|
String |
getPrefix()
|
String |
getProperty()
|
String |
getSuffix()
|
void |
release()
Release any acquired resources. |
void |
setBundle(String bundle)
|
void |
setFooter(String footer)
|
void |
setHeader(String header)
|
void |
setLocale(String locale)
|
void |
setName(String name)
|
void |
setPrefix(String prefix)
|
void |
setProperty(String property)
|
void |
setSuffix(String suffix)
|
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static MessageResources messages
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 prefix
protected String suffix
Constructor Detail |
---|
public ErrorsTag()
Method Detail |
---|
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 getPrefix()
public void setPrefix(String prefix)
public String getSuffix()
public void setSuffix(String suffix)
public int doStartTag() throws JspException
doStartTag
in interface Tag
doStartTag
in class TagSupport
JspException
- if a JSP exception has occurredpublic void release()
release
in interface Tag
release
in class TagSupport
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |