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.
Version:
- Craig R. McClanahan
protected String | bundle - The servlet context attribute key for our resources.
|
protected static Locale | defaultLocale - Use Locale.getDefault() directly.
|
protected static String | lineEnd - The line ending string.
|
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 | property - The name of the property for which error messages should be returned,
or
null to return all errors.
|
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.
lineEnd
protected static String lineEnd
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).
property
protected String property
The name of the property for which error messages should be returned,
or null
to return all errors.
doStartTag
public int doStartTag()
throws JspException
Render the specified error messages if there are any.
getBundle
public String getBundle()
getLocale
public String getLocale()
getName
public String getName()
getProperty
public String getProperty()
release
public void release()
Release any acquired resources.
setBundle
public void setBundle(String bundle)
setLocale
public void setLocale(String locale)
setName
public void setName(String name)
setProperty
public void setProperty(String property)
Copyright B) 2000-2005 - Apache Software Foundation