pt.moredata.taglibs
Class AbstractTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended bypt.moredata.taglibs.AbstractTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally
Direct Known Subclasses:
AbstractProtectTag, ContentTag, DAOAbstractTag, FormTag

public class AbstractTag
extends javax.servlet.jsp.tagext.TagSupport
implements javax.servlet.jsp.tagext.TryCatchFinally

AbstractTag.java Company MoreData

Version:
$Revision: 1.2 $
Author:
pcarmo
See Also:
Serialized Form

Field Summary
protected  java.lang.String uri
          URI da pagina que fez o pedido.
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
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
AbstractTag()
          Creates a new instance of AbstractTag
 
Method Summary
 void doCatch(java.lang.Throwable t)
          Invoked if a Throwable occurs while evaluating the BODY inside a tag or in any of the following methods: Tag.doStartTag(), Tag.doEndTag(), IterationTag.doAfterBody() and BodyTag.doInitBody().
 void doFinally()
          Invoked in all cases after doEndTag() for any class implementing Tag, IterationTag or BodyTag.
protected  javax.servlet.jsp.tagext.TagSupport getAncestor(java.lang.String className)
          Convenience method for finding ancestor names with a specific class name.
protected static javax.servlet.jsp.tagext.TagSupport getAncestor(javax.servlet.jsp.tagext.Tag childTag, java.lang.String parentTagClassName)
          Convenience method for finding ancestor names with a specific class name.
protected  java.lang.String getUri()
          Le e devolve o uri da pagina.
protected  java.lang.Object getVarFromJspPage(java.lang.String varName)
          Devolve um objecto de uma pagina dado o nome do objecto.
protected  void readUri()
          Le o uri da pagina.
protected  void setVarInJspPage(java.lang.String varName, java.lang.Object var)
           
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

uri

protected java.lang.String uri
URI da pagina que fez o pedido.

Constructor Detail

AbstractTag

public AbstractTag()
Creates a new instance of AbstractTag

Method Detail

getVarFromJspPage

protected java.lang.Object getVarFromJspPage(java.lang.String varName)
                                      throws javax.servlet.jsp.JspTagException
Devolve um objecto de uma pagina dado o nome do objecto. Este metodo assume que existe um objecto guardado ao nivel do pageContext.

Parameters:
varName - O nome da variavel.
Throws:
javax.servlet.jsp.JspTagException - Se o objecto nao for encontrado.

setVarInJspPage

protected void setVarInJspPage(java.lang.String varName,
                               java.lang.Object var)

getAncestor

protected javax.servlet.jsp.tagext.TagSupport getAncestor(java.lang.String className)
                                                   throws javax.servlet.jsp.JspTagException
Convenience method for finding ancestor names with a specific class name.

Throws:
javax.servlet.jsp.JspTagException

getAncestor

protected static javax.servlet.jsp.tagext.TagSupport getAncestor(javax.servlet.jsp.tagext.Tag childTag,
                                                                 java.lang.String parentTagClassName)
                                                          throws javax.servlet.jsp.JspTagException
Convenience method for finding ancestor names with a specific class name.

Parameters:
parentTagClassName - Nome da classe antecessora.
Throws:
javax.servlet.jsp.JspTagException

readUri

protected void readUri()
Le o uri da pagina.


getUri

protected java.lang.String getUri()
Le e devolve o uri da pagina.


doCatch

public void doCatch(java.lang.Throwable t)
             throws java.lang.Throwable
Invoked if a Throwable occurs while evaluating the BODY inside a tag or in any of the following methods: Tag.doStartTag(), Tag.doEndTag(), IterationTag.doAfterBody() and BodyTag.doInitBody(). This method is not invoked if the Throwable occurs during one of the setter methods. This method may throw an exception (the same or a new one) that will be propagated further up the nest chain. If an exception is thrown, doFinally() will be invoked. This method is intended to be used to respond to an exceptional condition.

Specified by:
doCatch in interface javax.servlet.jsp.tagext.TryCatchFinally
Parameters:
t - - The throwable exception navigating through this tag.
Throws:
java.lang.Throwable - - if the exception is to be rethrown further up the nest chain.

doFinally

public void doFinally()
Invoked in all cases after doEndTag() for any class implementing Tag, IterationTag or BodyTag. This method is invoked even if an exception has occurred in the BODY of the tag, or in any of the following methods: Tag.doStartTag(), Tag.doEndTag(), IterationTag.doAfterBody() and BodyTag.doInitBody(). This method is not invoked if the Throwable occurs during one of the setter methods. This method should not throw an Exception. This method is intended to maintain per-invocation data integrity and resource management actions.

Specified by:
doFinally in interface javax.servlet.jsp.tagext.TryCatchFinally