Skip navigation links
org.apache.myfaces.trinidad.webapp
Class TrinidadBodyTagSupport
java.lang.Object
org.apache.myfaces.trinidad.webapp.TrinidadTagSupport
org.apache.myfaces.trinidad.webapp.TrinidadBodyTagSupport
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
-
public class TrinidadBodyTagSupport
- extends TrinidadTagSupport
- implements javax.servlet.jsp.tagext.BodyTag
This is the Trinidad version of the JSP BodyTagSupport class. The main difference is that this class is NOT implementing the Serializable interface. A base class for defining tag handlers implementing BodyTag.
The TrinidadBodyTagSupport class implements the BodyTag interface and adds additional convenience methods including getter methods for the bodyContent property and methods to get at the previous out JspWriter.
Many (Trinidad) tag handlers will extend TrinidadBodyTagSupport and only redefine a few methods.
- Author:
- Apache Tomcat team
| Field Summary |
protected javax.servlet.jsp.tagext.BodyContent |
bodyContent
The current BodyContent for this BodyTag. |
| 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 |
TrinidadBodyTagSupport()
Default constructor, all subclasses are required to only define a public constructor with the same signature, and to call the superclass constructor. |
| Method Summary |
int |
doAfterBody()
After the body evaluation: do not reevaluate and continue with the page. |
int |
doEndTag()
Default processing of the end tag returning EVAL_PAGE. |
void |
doInitBody()
Prepare for evaluation of the body just before the first body evaluation: no action. |
int |
doStartTag()
Default processing of the start tag returning EVAL_BODY_BUFFERED. |
javax.servlet.jsp.tagext.BodyContent |
getBodyContent()
Get current bodyContent. |
javax.servlet.jsp.JspWriter |
getPreviousOut()
Get surrounding out JspWriter. |
void |
release()
Release state. |
void |
setBodyContent(javax.servlet.jsp.tagext.BodyContent b)
Prepare for evaluation of the body: stash the bodyContent away. |
| 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 |
getParent, setPageContext, setParent |
bodyContent
protected javax.servlet.jsp.tagext.BodyContent bodyContent
- The current BodyContent for this BodyTag.
TrinidadBodyTagSupport
public TrinidadBodyTagSupport()
- Default constructor, all subclasses are required to only define a public constructor with the same signature, and to call the superclass constructor. This constructor is called by the code generated by the JSP translator.
doStartTag
public int doStartTag()
throws javax.servlet.jsp.JspException
- Default processing of the start tag returning EVAL_BODY_BUFFERED.
-
- Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
- Overrides:
doStartTag in class TrinidadTagSupport
-
- Returns:
- EVAL_BODY_BUFFERED
- Throws:
javax.servlet.jsp.JspException - if an error occurred while processing this tag
- See Also:
Tag.doStartTag()
doEndTag
public int doEndTag()
throws javax.servlet.jsp.JspException
- Default processing of the end tag returning EVAL_PAGE.
-
- Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
- Overrides:
doEndTag in class TrinidadTagSupport
-
- Returns:
- EVAL_PAGE
- Throws:
javax.servlet.jsp.JspException - if an error occurred while processing this tag
- See Also:
Tag#doEndTag
setBodyContent
public void setBodyContent(javax.servlet.jsp.tagext.BodyContent b)
- Prepare for evaluation of the body: stash the bodyContent away.
-
- Specified by:
setBodyContent in interface javax.servlet.jsp.tagext.BodyTag
-
- Parameters:
b - the BodyContent
- See Also:
doAfterBody(), doInitBody(), BodyTag.setBodyContent(javax.servlet.jsp.tagext.BodyContent)
doInitBody
public void doInitBody()
throws javax.servlet.jsp.JspException
- Prepare for evaluation of the body just before the first body evaluation: no action.
-
- Specified by:
doInitBody in interface javax.servlet.jsp.tagext.BodyTag
-
- Throws:
javax.servlet.jsp.JspException - if an error occurred while processing this tag
- See Also:
setBodyContent(javax.servlet.jsp.tagext.BodyContent), doAfterBody(), BodyTag.doInitBody()
doAfterBody
public int doAfterBody()
throws javax.servlet.jsp.JspException
- After the body evaluation: do not reevaluate and continue with the page. By default nothing is done with the bodyContent data (if any).
-
- Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
- Overrides:
doAfterBody in class TrinidadTagSupport
-
- Returns:
- SKIP_BODY
- Throws:
javax.servlet.jsp.JspException - if an error occurred while processing this tag
- See Also:
doInitBody(), IterationTag.doAfterBody()
release
public void release()
- Release state.
-
- Specified by:
release in interface javax.servlet.jsp.tagext.Tag
- Overrides:
release in class TrinidadTagSupport
-
- See Also:
Tag#release
getBodyContent
public javax.servlet.jsp.tagext.BodyContent getBodyContent()
- Get current bodyContent.
-
- Returns:
- the body content.
getPreviousOut
public javax.servlet.jsp.JspWriter getPreviousOut()
- Get surrounding out JspWriter.
-
- Returns:
- the enclosing JspWriter, from the bodyContent.
Skip navigation links
Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.