org.dbforms.taglib
Class ErrorsTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by org.dbforms.taglib.AbstractScriptHandlerTag
              extended by org.dbforms.taglib.ErrorsTag
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally

public class ErrorsTag
extends AbstractScriptHandlerTag
implements javax.servlet.jsp.tagext.TryCatchFinally

Custom tag that renders error messages if an appropriate request attribute has been created.

This idea for this class came from a - much more powerful - class done by Craig R. McClanahan for the Apache struts framework.

Author:
Joe Peer
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
ErrorsTag()
           
 
Method Summary
 void doFinally()
          DOCUMENT ME!
 int doStartTag()
          Render the specified error messages if there are any.
 Vector extractUserDefinedErrors(Vector errors)
          philip.grunikiewicz 2001-05-10 Iterate through the errors and extract only user-specified text
 String getCaption()
          DOCUMENT ME!
 String getMessagePrefix()
          Insert the method's description here.
 String getName()
          DOCUMENT ME!
 void setCaption(String caption)
          DOCUMENT ME!
 void setMessagePrefix(String newMessagePrefix)
          Insert the method's description here.
 void setName(String name)
          DOCUMENT ME!
 
Methods inherited from class org.dbforms.taglib.AbstractScriptHandlerTag
doCatch, getAccessKey, getConfig, getOnBlur, getOnChange, getOnClick, getOnDblClick, getOnFocus, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getOnSelect, getStyle, getStyleClass, getTabIndex, getTitle, prepareEventHandlers, prepareStyles, setAccessKey, setOnBlur, setOnChange, setOnClick, setOnDblClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setOnSelect, setStyle, setStyleClass, setTabIndex, setTitle
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doEndTag, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.TryCatchFinally
doCatch
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Constructor Detail

ErrorsTag

public ErrorsTag()
Method Detail

setCaption

public void setCaption(String caption)
DOCUMENT ME!

Parameters:
caption - DOCUMENT ME!

getCaption

public String getCaption()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setMessagePrefix

public void setMessagePrefix(String newMessagePrefix)
Insert the method's description here. Creation date: (2001-05-10 12:57:08)

Parameters:
newMessagePrefix - java.lang.String

getMessagePrefix

public String getMessagePrefix()
Insert the method's description here. Creation date: (2001-05-10 12:57:08)

Returns:
java.lang.String

setName

public void setName(String name)
DOCUMENT ME!

Parameters:
name - DOCUMENT ME!

getName

public String getName()
DOCUMENT ME!

Returns:
DOCUMENT ME!

doFinally

public void doFinally()
DOCUMENT ME!

Specified by:
doFinally in interface javax.servlet.jsp.tagext.TryCatchFinally
Overrides:
doFinally in class AbstractScriptHandlerTag
See Also:
TryCatchFinally.doFinally()

doStartTag

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

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
Returns:
DOCUMENT ME!
Throws:
javax.servlet.jsp.JspException - if a JSP exception has occurred

extractUserDefinedErrors

public Vector extractUserDefinedErrors(Vector errors)
philip.grunikiewicz 2001-05-10 Iterate through the errors and extract only user-specified text

Parameters:
errors - DOCUMENT ME!
Returns:
DOCUMENT ME!


Copyright © 2002-2006 DbForms. All Rights Reserved.