javax.faces.webapp
Class UIComponentBodyTag

java.lang.Object
  |
  +--javax.faces.webapp.UIComponentTag
        |
        +--javax.faces.webapp.UIComponentBodyTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public abstract class UIComponentBodyTag
extends UIComponentTag
implements javax.servlet.jsp.tagext.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  javax.servlet.jsp.tagext.BodyContent bodyContent
          The bodyContent for this tag handler.
 
Fields inherited from class javax.faces.webapp.UIComponentTag
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
UIComponentBodyTag()
           
 
Method Summary
 int doAfterBody()
          Handle the ending of the nested body content for this tag.
 void doInitBody()
          Prepare for evaluation of the body.
 javax.servlet.jsp.tagext.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.
 javax.servlet.jsp.JspWriter getPreviousOut()
          Get the JspWriter from our BodyContent.
 void release()
          Release any resources allocated during the execution of this tag handler.
 void setBodyContent(javax.servlet.jsp.tagext.BodyContent bodyContent)
          Set the bodyContent for this tag handler.
 
Methods inherited from class javax.faces.webapp.UIComponentTag
doEndTag, doStartTag, encodeBegin, encodeChildren, encodeEnd, findComponent, getComponentInstance, getComponentType, getCreated, getDoEndValue, getFacesContext, getFacetName, getId, getParent, getParentUIComponentTag, getRendererType, isSuppressed, isValueReference, setBinding, setId, setPageContext, setParent, setProperties, 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 javax.servlet.jsp.tagext.BodyContent bodyContent

The bodyContent for this tag handler.

Constructor Detail

UIComponentBodyTag

public UIComponentBodyTag()
Method Detail

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.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.

It should be noted that if this method returns IterationTag.EVAL_BODY_AGAIN, any nested UIComponentTag must have an explicit ID set.

Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
Throws:
javax.servlet.jsp.JspException - if an error is encountered

doInitBody

public void doInitBody()
                throws javax.servlet.jsp.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 javax.servlet.jsp.tagext.BodyTag
Throws:
javax.servlet.jsp.JspException - if an error is encountered

release

public void release()
Description copied from class: UIComponentTag

Release any resources allocated during the execution of this tag handler.

Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class UIComponentTag

setBodyContent

public void setBodyContent(javax.servlet.jsp.tagext.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 javax.servlet.jsp.tagext.BodyTag
Parameters:
bodyContent - The new BodyContent for this tag

getBodyContent

public javax.servlet.jsp.tagext.BodyContent getBodyContent()

Return the BodyContent for this tag handler.


getPreviousOut

public javax.servlet.jsp.JspWriter getPreviousOut()

Get the JspWriter from our BodyContent.


getDoAfterBodyValue

protected int getDoAfterBodyValue()
                           throws javax.servlet.jsp.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.

javax.servlet.jsp.JspException

getDoStartValue

protected int getDoStartValue()
                       throws javax.servlet.jsp.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:
javax.servlet.jsp.JspException - to cause doStart() to throw an exception


Copyright ? 2002-2004 Sun Microsystems, Inc. All Rights Reserved.