it.eng.spago.taglib.html
Class ErrorsTag

java.lang.Object
  extended by TagSupport
      extended by it.eng.spago.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:

Version:
$Rev: 376841 $ $Date: 2005-08-21 19:08:45 -0400 (Sun, 21 Aug 2005) $

Field Summary
protected  java.lang.String bundle
          The servlet context attribute key for our resources.
protected  java.lang.String category
           
protected  java.lang.String footer
          The message resource key for errors footer.
protected  java.lang.String header
          The message resource key for errors header.
protected  java.lang.String prefix
          The message resource key for errors prefix.
protected  java.lang.String property
          The name of the property for which error messages should be returned, or null to return all errors.
protected  java.lang.String severity
           
protected  java.lang.String suffix
          The message resource key for errors suffix.
 
Constructor Summary
ErrorsTag()
           
 
Method Summary
 int doStartTag()
          Render the specified error messages if there are any.
 java.lang.String getBundle()
           
 java.lang.String getFooter()
           
 java.lang.String getHeader()
           
 java.lang.String getPrefix()
           
 java.lang.String getProperty()
           
 java.lang.String getSuffix()
           
 void release()
          Release any acquired resources.
 void setBundle(java.lang.String bundle)
           
 void setCategory(java.lang.String category)
           
 void setFooter(java.lang.String footer)
           
 void setHeader(java.lang.String header)
           
 void setPrefix(java.lang.String prefix)
           
 void setProperty(java.lang.String property)
           
 void setSeverity(java.lang.String severity)
           
 void setSuffix(java.lang.String suffix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bundle

protected java.lang.String bundle
The servlet context attribute key for our resources.


category

protected java.lang.String category

severity

protected java.lang.String severity

property

protected java.lang.String property
The name of the property for which error messages should be returned, or null to return all errors.


header

protected java.lang.String header
The message resource key for errors header.


footer

protected java.lang.String footer
The message resource key for errors footer.


prefix

protected java.lang.String prefix
The message resource key for errors prefix.


suffix

protected java.lang.String suffix
The message resource key for errors suffix.

Constructor Detail

ErrorsTag

public ErrorsTag()
Method Detail

setCategory

public void setCategory(java.lang.String category)

setSeverity

public void setSeverity(java.lang.String severity)

getBundle

public java.lang.String getBundle()

setBundle

public void setBundle(java.lang.String bundle)

getProperty

public java.lang.String getProperty()

setProperty

public void setProperty(java.lang.String property)

getHeader

public java.lang.String getHeader()

setHeader

public void setHeader(java.lang.String header)

getFooter

public java.lang.String getFooter()

setFooter

public void setFooter(java.lang.String footer)

getPrefix

public java.lang.String getPrefix()

setPrefix

public void setPrefix(java.lang.String prefix)

getSuffix

public java.lang.String getSuffix()

setSuffix

public void setSuffix(java.lang.String suffix)

doStartTag

public int doStartTag()
               throws JspException
Render the specified error messages if there are any.

Throws:
JspException - if a JSP exception has occurred

release

public void release()
Release any acquired resources.