javax.faces.webapp
Class UIComponentBodyTag

java.lang.Object
  extended byjavax.faces.webapp.UIComponentTag
      extended byjavax.faces.webapp.UIComponentBodyTag
All Implemented Interfaces:
BodyTag, IterationTag, JspTag, Tag
Direct Known Subclasses:
FacesBodyTag

public abstract class UIComponentBodyTag
extends UIComponentTag
implements BodyTag

UIComponentBodyTag is a base class for all JSP custom actions, related to a UIComponent, that need to process their tag bodies.


Field Summary
protected  BodyContent bodyContent
          The bodyContent for this tag handler.
 
Fields inherited from class javax.faces.webapp.UIComponentTag
context, id, pageContext, rendered, renderedSet
 
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
UIComponentBodyTag()
           
 
Method Summary
 int doAfterBody()
          Handle the ending of the nested body content for this tag.
 void doInitBody()
          Prepare for evaluation of the body.
 BodyContent getBodyContent()
          Return the BodyContent for this tag handler.
protected  int getDoAfterBodyValue()
          Return the flag value that should be returned from the doAfterBody() method when it is called.
protected  int getDoStartValue()
          Return the flag value that should be returned from the doStart() method when it is called.
 JspWriter getPreviousOut()
          Get the JspWriter from our BodyContent.
 void release()
          Called on a Tag handler to release state.
 void setBodyContent(BodyContent bodyContent)
          Set the bodyContent for this tag handler.
 
Methods inherited from class javax.faces.webapp.UIComponentTag
doEndTag, doStartTag, encodeBegin, encodeChildren, encodeEnd, findComponent, getChildIndex, getComponent, getComponentType, getCreated, getDoEndValue, getFacetName, getParent, getParentUIComponentTag, getRendererType, incrementChildIndex, isSuppressed, overrideProperties, setId, setPageContext, setParent, setRendered, setupResponseWriter
 
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
doEndTag, doStartTag, getParent, setPageContext, setParent
 

Field Detail

bodyContent

protected BodyContent bodyContent

The bodyContent for this tag handler.

Constructor Detail

UIComponentBodyTag

public UIComponentBodyTag()
Method Detail

doAfterBody

public int doAfterBody()
                throws JspException

Handle the ending of the nested body content for this tag. The default implementation simply calls getDoAfterBodyValue() to retrieve the flag value to be returned.

Specified by:
doAfterBody in interface IterationTag
Returns:
whether additional evaluations of the body are desired
Throws:
JspException - if an error is encountered

doInitBody

public void doInitBody()
                throws JspException

Prepare for evaluation of the body. This method is invoked by the JSP page implementation object after setBodyContent() and before the first time the body is to be evaluated. This method will not be invoked for empty tags or for non-empty tags whose doStartTag() method returns SKIP_BODY or EVAL_BODY_INCLUDE.

Specified by:
doInitBody in interface BodyTag
Throws:
JspException - if an error is encountered
See Also:
IterationTag.doAfterBody()

release

public void release()
Description copied from interface: Tag
Called on a Tag handler to release state. The page compiler guarantees that JSP page implementation objects will invoke this method on all tag handlers, but there may be multiple invocations on doStartTag and doEndTag in between.

Specified by:
release in interface Tag
Overrides:
release in class UIComponentTag

setBodyContent

public void setBodyContent(BodyContent bodyContent)

Set the bodyContent for this tag handler. This method is invoked by the JSP page implementation object at most once per action invocation, before doInitiBody(). This method will not be invoked for empty tags or for non-empty tags whose doStartTag() method returns SKIP_BODY or EVAL_BODY_INCLUDE.

Specified by:
setBodyContent in interface BodyTag
Parameters:
bodyContent - The new BodyContent for this tag
See Also:
BodyTag.doInitBody(), IterationTag.doAfterBody()

getBodyContent

public BodyContent getBodyContent()

Return the BodyContent for this tag handler.


getPreviousOut

public JspWriter getPreviousOut()

Get the JspWriter from our BodyContent.


getDoAfterBodyValue

protected int getDoAfterBodyValue()
                           throws JspException

Return the flag value that should be returned from the doAfterBody() method when it is called. Subclasses may override this method to return the appropriate value.

Throws:
JspException

getDoStartValue

protected int getDoStartValue()
                       throws JspException
Description copied from class: UIComponentTag

Return the flag value that should be returned from the doStart() method when it is called. Subclasses may override this method to return the appropriate value.

Overrides:
getDoStartValue in class UIComponentTag
Throws:
JspException - to cause doStart() to throw an exception