org.apache.beehive.netui.tags.html
Class Error

Object
  extended by SimpleTagSupport
      extended by AbstractSimpleTag
          extended by ErrorBaseTag
              extended by Error
All Implemented Interfaces:
JspTag, SimpleTag, INetuiTag

public class Error
extends ErrorBaseTag

Renders an error message with a given error key value if that key can be found in the ActionErrors registered in the pageContext at org.apache.struts.action.Action.ERROR_KEY. Error ignores its body content.

The following optional message keys will be utilized if corresponding messages exist for them in the application resources:

Example
In this sample, the "InvalidName" message from the errorMessages bundle will be used to output the error.
 <netui:error bundle="com.project.errorMessages" value="InvalidName"/>

Field Summary
 
Fields inherited from class ErrorBaseTag
_bundle, _locale, defaultLocale
 
Constructor Summary
Error()
           
 
Method Summary
 void doTag()
          Render the specified error message if it can be found.
 String getTagName()
          Return the name of the Tag.
 void setValue(String value)
          Set the value of the error key.
 
Methods inherited from class ErrorBaseTag
getErrorMessage, getQualifiedBundleName, isMissingUserDefaultMessages, setBundle, setLocale
 
Methods inherited from class AbstractSimpleTag
addTagIdMapping, getBufferBody, getInlineError, getPageContext, getScriptReporter, getUserLocale, hasErrors, registerTagError, registerTagError, reportErrors, rewriteName, setNonEmptyValueAttribute, setRequiredValueAttribute, write
 
Methods inherited from class SimpleTagSupport
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Error

public Error()
Method Detail

getTagName

public String getTagName()
Return the name of the Tag.

Specified by:
getTagName in interface INetuiTag
Specified by:
getTagName in class AbstractSimpleTag
Returns:
the name of the tag.

setValue

public void setValue(String value)
              throws JspException
Set the value of the error key.

Parameters:
value - - the error key value
Throws:
JspException

doTag

public void doTag()
           throws JspException
Render the specified error message if it can be found.

Specified by:
doTag in interface SimpleTag
Overrides:
doTag in class SimpleTagSupport
Throws:
JspException - if a JSP exception has occurred