org.apache.beehive.netui.tags.databinding.repeater
Class RepeaterComponent

Object
  extended by TagSupport
      extended by BodyTagSupport
          extended by AbstractClassicTag
              extended by RepeaterComponent
All Implemented Interfaces:
Serializable, BodyTag, IterationTag, JspTag, Tag, INetuiTag
Direct Known Subclasses:
Pad, RepeaterFooter, RepeaterHeader, RepeaterItem

public abstract class RepeaterComponent
extends AbstractClassicTag

The base class for tags that are part of the Repeater tag set and participate in the structured nature of Repeater rendering. This class provides typed access to the Repeater tag and enforces the basic JSP tag parenting requirements of tags that can only be nested within the Repeater tag.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class AbstractClassicTag
DefaultNamingChain, EMPTY_STRING, NETUI_UNIQUE_CNT
 
Fields inherited from class BodyTagSupport
bodyContent
 
Fields inherited from class TagSupport
id, pageContext
 
Fields inherited from interface BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
RepeaterComponent()
           
 
Method Summary
 int doAfterBody()
          Default implementation of this JSP lifecycle method.
 int doEndTag()
          Ends a tag's lifecycle.
 int doStartTag()
           Starts a tag's lifecycle.
protected  Repeater getRepeater()
          Get the Repeater parent of this tag.
protected  void localRelease()
          Reset all of the fields of this tag.
protected  int renderEndTag(int state)
           
protected abstract  boolean shouldRender()
           
protected  void verifyAttributes()
           
 
Methods inherited from class AbstractClassicTag
applyNamingChain, getErrorsReport, getIdForTagId, getNamingChain, getNearestForm, getNextId, getScriptReporter, getTagName, getUserLocale, hasErrors, qualifyAttribute, registerTagError, registerTagError, reportAndExit, reportErrors, rewriteName, setNonEmptyValueAttribute, setRequiredValueAttribute, write
 
Methods inherited from class BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface Tag
getParent, setPageContext, setParent
 

Constructor Detail

RepeaterComponent

public RepeaterComponent()
Method Detail

doStartTag

public int doStartTag()
               throws JspException

Starts a tag's lifecycle. This method performs several operations before invoking the @see renderStartTag(int) method. In order, these stages are:

  1. @see verifyAttributes()
  2. @see renderStartTag(int)

Any errors that occur before calling @see renderStartTag(int) are reported in the page.

Specified by:
doStartTag in interface Tag
Overrides:
doStartTag in class BodyTagSupport
Returns:
the value returned from calling @see renderStartTag(int), which can be any value that can be returned from the @see javax.servlet.jsp.tagext.TagSupport class. If an error occurs, the tag returns SKIP_BODY.
Throws:
JspException

doAfterBody

public int doAfterBody()
                throws JspException
Default implementation of this JSP lifecycle method.

Specified by:
doAfterBody in interface IterationTag
Overrides:
doAfterBody in class BodyTagSupport
Returns:
SKIP_BODY
Throws:
JspException

doEndTag

public int doEndTag()
             throws JspException
Ends a tag's lifecycle. This call is a wrapper around the @see renderEndTag(int) call that allows a tag directly contained in a repeating tag to act based on the state of the parent.

Specified by:
doEndTag in interface Tag
Overrides:
doEndTag in class BodyTagSupport
Returns:
EVAL_PAGE
Throws:
JspException - if an error that occurred that could not be reported to the page

getRepeater

protected final Repeater getRepeater()
Get the Repeater parent of this tag.

Returns:
the Repeater parent of this tag

localRelease

protected void localRelease()
Reset all of the fields of this tag.

Overrides:
localRelease in class AbstractClassicTag

shouldRender

protected abstract boolean shouldRender()

verifyAttributes

protected void verifyAttributes()
                         throws JspException
Throws:
JspException

renderEndTag

protected int renderEndTag(int state)
                    throws JspException
Throws:
JspException