pt.moredata.dataentry.taglibs
Class AbstractIfTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.tagext.BodyTagSupport
          extended bypt.moredata.dataentry.taglibs.AbstractIfTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, 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:
DoAfterCommandTag, DoIfErrorTag, DoIfTag

public abstract class AbstractIfTag
extends javax.servlet.jsp.tagext.BodyTagSupport
implements javax.servlet.jsp.tagext.TryCatchFinally

AbstractIfTag.java Implementacao abstracta de uma tag que implementa um IF. A verificacao da condicao do if devera estar implementada numa subclasse. Company MoreData

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

Field Summary
protected  DataEntry _dataEntry
          Entrada de dados.
protected  javax.servlet.jsp.JspWriter _out
          Output writer.
protected  javax.servlet.http.HttpSession _session
          Objecto de sessao.
 
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
AbstractIfTag()
           
 
Method Summary
 int doAfterBody()
          Metodo executado em cada iteracao depois de se ter processado o conteudo da tag.
protected  void doBeforeStartTag()
          Codigo executado antes do codigo do metodo doStartTag().
 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().
 int doEndTag()
          Processa o fim da tag.
 void doFinally()
          Invoked in all cases after doEndTag() for any class implementing Tag, IterationTag or BodyTag.
 void doInitBody()
          Metodo executado em cada iteracao antes de processar o conteudo da tag.
 int doStartTag()
          Processa o inicio da tag.
protected abstract  boolean includeBodyTag()
          Verifica se o conteudo da tag devera ser incluido ou nao
protected  void init()
           
 void setDataEntryId(java.lang.String dataEntryId)
          Setter for property dataEntryId.
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
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.Tag
getParent, setPageContext, setParent
 

Field Detail

_session

protected javax.servlet.http.HttpSession _session
Objecto de sessao.


_out

protected javax.servlet.jsp.JspWriter _out
Output writer.


_dataEntry

protected DataEntry _dataEntry
Entrada de dados.

Constructor Detail

AbstractIfTag

public AbstractIfTag()
Method Detail

includeBodyTag

protected abstract boolean includeBodyTag()
Verifica se o conteudo da tag devera ser incluido ou nao


doBeforeStartTag

protected void doBeforeStartTag()
                         throws java.io.IOException
Codigo executado antes do codigo do metodo doStartTag().

Throws:
java.io.IOException

init

protected void init()
             throws javax.servlet.jsp.JspTagException
Throws:
javax.servlet.jsp.JspTagException

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspTagException
Processa o inicio da tag.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Returns:
A accao que deve ser tomada pelo servidor de .jsp apos ler o inicio da tag.
Throws:
javax.servlet.jsp.JspTagException

doInitBody

public void doInitBody()
                throws javax.servlet.jsp.JspTagException
Metodo executado em cada iteracao antes de processar o conteudo da tag.

Specified by:
doInitBody in interface javax.servlet.jsp.tagext.BodyTag
Throws:
javax.servlet.jsp.JspTagException - Caso ocorra algum erro a processar a tag.

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspTagException
Metodo executado em cada iteracao depois de se ter processado o conteudo da tag.

Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
Returns:
SKIP_BODY para deixar de processar o conteudo da tag.
Throws:
javax.servlet.jsp.JspTagException - Caso ocorra algum erro a processar a tag.

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspTagException
Processa o fim da tag.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Returns:
a accao que deve ser tomada pelo servidor de .jsp apos ler a tag.
Throws:
javax.servlet.jsp.JspTagException

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

setDataEntryId

public void setDataEntryId(java.lang.String dataEntryId)
Setter for property dataEntryId.

Parameters:
dataEntryId - New value of property dataEntryId.