org.apache.struts.taglib.html
Class ErrorsTag
TagSupport
org.apache.struts.taglib.html.ErrorsTag
public class ErrorsTag
extends TagSupport
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:
- errors.header - If present, the corresponding message will be
rendered prior to the individual list of error messages.
- errors.footer - If present, the corresponding message will be
rendered following the individual list of error messages.
- errors.prefix - If present, the corresponding message will be
rendered before each individual error message.
- errors.suffix - If present, the corresponding message will be
rendered after each individual error message.
$Rev: 164530 $ $Date: 2005-04-25 04:11:07 +0100 (Mon, 25 Apr 2005) $protected String | bundle - The servlet context attribute key for our resources.
|
protected static Locale | defaultLocale - Use Locale.getDefault() directly.
|
protected String | footer - The message resource key for errors footer.
|
protected String | header - The message resource key for errors header.
|
protected static String | lineEnd - No longer used.
|
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.
|
bundle
protected String bundle
The servlet context attribute key for our resources.
defaultLocale
protected static Locale defaultLocale
Use Locale.getDefault() directly.
The default locale on our server.
footer
protected String footer
The message resource key for errors footer.
header
protected String header
The message resource key for errors header.
lineEnd
protected static String lineEnd
No longer used.
The line ending string.
locale
protected String locale
The session attribute key for our locale.
messages
protected static MessageResources messages
The message resources for this package.
name
protected String name
The request attribute key for our error messages (if any).
prefix
protected String prefix
The message resource key for errors prefix.
property
protected String property
The name of the property for which error messages should be returned,
or null
to return all errors.
suffix
protected String suffix
The message resource key for errors suffix.
doStartTag
public int doStartTag()
throws JspException
Render the specified error messages if there are any.
getBundle
public String getBundle()
getFooter
public String getFooter()
getHeader
public String getHeader()
getLocale
public String getLocale()
getName
public String getName()
getPrefix
public String getPrefix()
getProperty
public String getProperty()
getSuffix
public String getSuffix()
release
public void release()
Release any acquired resources.
setBundle
public void setBundle(String bundle)
setFooter
public void setFooter(String footer)
setHeader
public void setHeader(String header)
setLocale
public void setLocale(String locale)
setName
public void setName(String name)
setPrefix
public void setPrefix(String prefix)
setProperty
public void setProperty(String property)
setSuffix
public void setSuffix(String suffix)
Copyright B) 2000-2007 - The Apache Software Foundation