Errors Class
- public class Errors
extends AbstractBaseTag
Renders the set of error messages found in the ActionErrors
registered in the pageContext at org.apache.struts.action.Action.ERROR_KEY.
Errors ignores its body content.
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.
Attribute Descriptions |
Attribute | Required | Runtime Expression Evaluation | Data Bindable |
bundle | No | No | No |
The message bundle where the error messages can be found |
locale | No | No | No |
The session attribute key for the locale |
Related Topics
Form Validation Sample
Error
-
Hierarchy
-
Object
TagSupport
BodyTagSupport
AbstractBaseTag
Errors
-
All Implemented Interfaces
-
BodyTag
, IterationTag
, Serializable
, Tag
protected String |
-
bundle
- The message bundle where the error messages can be found.
|
protected static Locale |
-
defaultLocale
- The default locale on our server.
|
protected String |
-
locale
- The session attribute key for the locale.
|
Fields from com.bea.wlw.netui.tags.AbstractBaseTag |
ATTR_GENERAL , ATTR_GENERAL_EXPRESSION , ATTR_JAVASCRIPT , ATTR_STYLE , CLASS , ID , JAVASCRIPT_STATUS , NAME , NETUI_UNIQUE_CNT , ONCLICK , ONDBLCLICK , ONKEYDOWN , ONKEYPRESS , ONKEYUP , ONMOUSEDOWN , ONMOUSEMOVE , ONMOUSEOUT , ONMOUSEOVER , ONMOUSEUP , STYLE , TABINDEX
|
Methods from com.bea.wlw.netui.tags.AbstractBaseTag |
addTagIdMapping , evaluateAttributeToString , filter , filter , getJavaScriptUtils , getNearestForm , getScriptReporter , getUserLocale , registerTagError , release , renderAttribute , rewriteName , write
|
Methods from javax.servlet.jsp.tagext.TagSupport |
doAfterBody, doEndTag, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue |
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bundle
protected String
bundle
- The message bundle where the error messages can be found.
This defaults to org.apache.struts.action.Action.MESSAGES_KEY.
defaultLocale
protected static Locale
defaultLocale
- The default locale on our server.
locale
protected String
locale
- The session attribute key for the locale.
This defaults to org.apache.struts.action.Action.LOCALE_KEY.
Errors
public Errors()
doStartTag() Method
public int doStartTag()
throws JspException
Render the specified error messages if there are any.
-
Overrides
-
BodyTagSupport.doStartTag()
Exceptions
-
JspException
- if a JSP exception has occurred
getBundle() Method
public String
getBundle()
Returns the name of the message bundle.
Returns
- the bundle's name
getLocale() Method
public String
getLocale()
Returns the name of the locale attribute.
Returns
- the locale attribute name
getTagName() Method
public String
getTagName()
Return the name of the Tag.
-
Overrides
-
AbstractBaseTag.getTagName()
localRelease() Method
protected void localRelease()
Release any acquired resources.
-
Overrides
-
AbstractBaseTag.localRelease()
setBundle(String) Method
public void setBundle(String
bundle)
Set the name of the message bundle.
Parameters
-
bundle
- - the bundle name
setLocale(String) Method
public void setLocale(String
locale)
Set the name of the locale attribute.
Parameters
-
locale
- - the locale attribute name