|
|||||||||||
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
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 java.lang.String |
bundle
The servlet context attribute key for our resources. |
protected static java.util.Locale |
defaultLocale
Deprecated. Use Locale.getDefault() directly. |
protected static java.lang.String |
lineEnd
The line ending string. |
protected java.lang.String |
locale
The session attribute key for our locale. |
protected static MessageResources |
messages
The message resources for this package. |
protected java.lang.String |
name
The request attribute key for our error messages (if any). |
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.TagSupport |
id, pageContext |
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. |
java.lang.String |
getBundle()
|
java.lang.String |
getLocale()
|
java.lang.String |
getName()
|
java.lang.String |
getProperty()
|
void |
release()
Release any acquired resources. |
void |
setBundle(java.lang.String bundle)
|
void |
setLocale(java.lang.String locale)
|
void |
setName(java.lang.String name)
|
void |
setProperty(java.lang.String property)
|
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
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 java.lang.String bundle
protected static java.util.Locale defaultLocale
protected static java.lang.String lineEnd
protected java.lang.String locale
protected static MessageResources messages
protected java.lang.String name
protected java.lang.String property
null
to return all errors.
Constructor Detail |
public ErrorsTag()
Method Detail |
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 int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.TagSupport
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.TagSupport
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |