com.taggercat.tags
Class TCChooseTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by com.taggercat.tags.TCChooseTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class TCChooseTag
extends javax.servlet.jsp.tagext.TagSupport

This tag is the parent of the TCWhen, and TCOtherwise tags. This tag functions the same as the JSTL tag of the same name. The difference is that it uses the Tagger Cat EL. If any of the enclosed TCWhen tags evaluate to true, all remaining TCWhen tags, and the TCOtherwise tags are ignored.

See Also:
TCWhenTag, TCOtherwiseTag, Serialized Form
 

Field Summary
 
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
TCChooseTag()
           
 
Method Summary
 int doEndTag()
          Process the end tag.
 int doStartTag()
          Always process the body.
 boolean isWhenFound()
          Returns true if an enclosing when condition has been found.
 void setWhenFound(boolean state)
          Sets whenFound.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TCChooseTag

public TCChooseTag()
Method Detail

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Process the end tag. This method will be called on all Tag objects. All instance state associated with this instance must be reset.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspException
Returns:
EVAL_PAGE

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Always process the body.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspException
Returns:
EVAL_BODY_INCLUDE

isWhenFound

public boolean isWhenFound()
Returns true if an enclosing when condition has been found.

Returns:
true if an enclosing when condition has been found

setWhenFound

public void setWhenFound(boolean state)
Sets whenFound.

Parameters:
state - the whenFound value