pt.moredata.dataentry.taglibs
Class DeclareDataEntryTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended bypt.moredata.dataentry.taglibs.DeclareDataEntryTag
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

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

Esta tag declara num JSP uma variavel do tipo DataEntry que foi anteriormente criada com a tag A variavel criada esta disponivel dentro da tag apenas. Company MoreData

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

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
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
DeclareDataEntryTag()
           
 
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().
 int doEndTag()
          Processa o fim da tag.
 void doFinally()
          Invoked in all cases after doEndTag() for any class implementing Tag, IterationTag or BodyTag.
 int doStartTag()
          Processa o inicio da tag.
 DataEntry getDataEntry()
          Getter for property dataEntry.
static DataEntry getDataEntryFormParent(javax.servlet.jsp.tagext.Tag chield)
          Devolve o DataEntry declarado a partir de uma tag .
static DataEntry getDataEntryFromDataEntryId(javax.servlet.jsp.PageContext thePageContext, java.lang.String dataEntryId)
          Devolve o DataEntry que foi declarado atraves de uma tag do tipo DeclareDataEntryTag.
static DataEntryPool getDataEntryPool(javax.servlet.http.HttpSession session)
          Devolve a pool de DataEntrys que esta associada a sessao.
 java.lang.String getScope()
          Getter for property scope.
static DataEntry initDataEntry(javax.servlet.http.HttpServletRequest request)
          Procura pela entrada de dados, a partir do nome e serial key da tabela.
static DataEntry initDataEntry(javax.servlet.jsp.PageContext pageContext, java.lang.String dataEntryId, javax.servlet.jsp.tagext.Tag chield, java.lang.String tagName)
          Procura pela entrada de dados atraves no nome da variavel criada pela tag ou .
 void setId(java.lang.String id)
          Setter for property id.
 void setName(java.lang.String name)
          Setter for property name.
 void setScope(java.lang.String scope)
          Setter for property scope.
 void setTableName(java.lang.String tableName)
          Setter for property tableName.
 void setTableSerialKey(java.lang.String tableSerialKey)
          Setter for property tableSerialKey.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeclareDataEntryTag

public DeclareDataEntryTag()
Method Detail

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 - Caso ocorra um 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 - Caso ocorra um erro a processar a tag.

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

setTableSerialKey

public void setTableSerialKey(java.lang.String tableSerialKey)
Setter for property tableSerialKey.

Parameters:
tableSerialKey - New value of property tableSerialKey.

setTableName

public void setTableName(java.lang.String tableName)
Setter for property tableName.

Parameters:
tableName - New value of property tableName.

getDataEntry

public DataEntry getDataEntry()
Getter for property dataEntry.

Returns:
Value of property dataEntry.

getDataEntryFromDataEntryId

public static DataEntry getDataEntryFromDataEntryId(javax.servlet.jsp.PageContext thePageContext,
                                                    java.lang.String dataEntryId)
Devolve o DataEntry que foi declarado atraves de uma tag do tipo DeclareDataEntryTag.

Parameters:
thePageContext - A variavel pageContext da padina onde o DataEntry esta definido.
dataEntryId - A identificacao usada para declarar o DataEntry.
Returns:
O o DataEntry que foi declarado atraves de uma tag do tipo DeclareDataEntryTag.

getDataEntryFormParent

public static DataEntry getDataEntryFormParent(javax.servlet.jsp.tagext.Tag chield)
Devolve o DataEntry declarado a partir de uma tag . Este metodo procura por uma tag do tipo DeclareDataEntryTag onde a tag 'chield' esta aninhada.

Parameters:
chield - A tag que deve estar aninhada dentro da tag .
Returns:
O DataEntry declarado a partir de uma tag .

initDataEntry

public static DataEntry initDataEntry(javax.servlet.jsp.PageContext pageContext,
                                      java.lang.String dataEntryId,
                                      javax.servlet.jsp.tagext.Tag chield,
                                      java.lang.String tagName)
                               throws javax.servlet.jsp.JspTagException
Procura pela entrada de dados atraves no nome da variavel criada pela tag ou . Se o nome da variavel nao for especificado a entrada de dados e procurada na tag onde a tag que chamou este metodo esta aninhada.

Throws:
javax.servlet.jsp.JspTagException

initDataEntry

public static DataEntry initDataEntry(javax.servlet.http.HttpServletRequest request)
Procura pela entrada de dados, a partir do nome e serial key da tabela.


getDataEntryPool

public static DataEntryPool getDataEntryPool(javax.servlet.http.HttpSession session)
Devolve a pool de DataEntrys que esta associada a sessao. Se nao existir e criada uma pool e guardada na sessao.


setName

public void setName(java.lang.String name)
Setter for property name.

Parameters:
name - New value of property name.

setId

public void setId(java.lang.String id)
Setter for property id.

Parameters:
id - New value of property id.

getScope

public java.lang.String getScope()
Getter for property scope.

Returns:
Value of property scope.

setScope

public void setScope(java.lang.String scope)
Setter for property scope.

Parameters:
scope - New value of property scope.