com.bea.wlw.netui.tags.databinding.base
Class StructuredBaseTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
com.bea.wlw.netui.tags.AbstractBaseTag
com.bea.wlw.netui.tags.databinding.base.StructuredBaseTag
- All Implemented Interfaces:
- HtmlConstants, Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
- Direct Known Subclasses:
- GridComponent, RepeaterComponent
public abstract class StructuredBaseTag
- extends AbstractBaseTag
A base tag for NetUI Databinding tags that are work in a repeating
context. This tag encapsulates code that is common across may of the NetUI tags
which are diretly contained in the @see com.bea.wlw.netui.tags.databinding.repeater.Repeater
and @see com.bea.wlw.netui.tags.databinding.grid.Grid tags.
This tag provides commonly used features such as buffering of content, a simple
mechanism for verifying a tag's parent structure, and verifying the attributes
set on a tag instance.
Tags that extend this base class participate in sometimes complex rendering
cycles of repeating tags. As a result, as the containing tag evalutes its
body, it treats the lifecycle of this evaluation as a state machine. The
direct child tags which extend this class often need to know the state of the
parent tag. There are two convenience methods that are invoked by this
tag's @see doStartTag() and @see doEndTag methods that pass the current
state of the parent to the child tags. The @see renderStartTag and @see renderEndTag
can return any values that the @see javax.servlet.jsp.tagext.TagSupport#doStartTag(int)
and the @see javax.servlet.jsp.tagext.TagSupport#doEndTag(int) calls can
return.
- See Also:
- Serialized Form
- Exclude:
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
bodyContent |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
Fields inherited from interface com.bea.wlw.netui.tags.html.HtmlConstants |
ACCEPT, ACCESSKEY, ACTION, ALIGN, ALINK, ALT, ANCHOR, BACKGROUND, BASE, BGCOLOR, BODY, BORDER, BR, CAPTION, CELLPADDING, CELLSPACING, CHAR, CHAROFF, CHARSET, CHECKED, CLASS, COLS, COORDS, DIR, DISABLED, DIV, ENCTYPE, FOR, FORM, FORM_GET, FORM_POST, FRAME, HEIGHT, HREF, HREFLANG, HSPACE, HTML, ID, IMAGE, INPUT, INPUT_BUTTON, INPUT_CHECKBOX, INPUT_FILE, INPUT_HIDDEN, INPUT_IMAGE, INPUT_PASSWORD, INPUT_RADIO, INPUT_RESET, INPUT_SUBMIT, INPUT_TEXT, ISMAP, LABEL, LANG, LINK, LONGDESC, MAXLENGTH, METHOD, NAME, ONBLUR, ONCHANGE, ONCLICK, ONDBLCLICK, ONFOCUS, ONKEYDOWN, ONKEYPRESS, ONKEYUP, ONLOAD, ONMOUSEDOWN, ONMOUSEMOVE, ONMOUSEOUT, ONMOUSEOVER, ONMOUSEUP, ONRESET, ONSELECT, ONSUBMIT, ONUNLOAD, OPTION, READONLY, REL, REV, ROWS, RULES, SELECT, SHAPE, SIZE, SPAN, SRC, STYLE, SUMMARY, TABINDEX, TABLE, TARGET, TD, TEXT, TEXTAREA, TITLE, TR, TYPE, USEMAP, VALIGN, VALUE, VLINK, VSPACE, WIDTH |
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 |
Methods inherited from class com.bea.wlw.netui.tags.AbstractBaseTag |
addTagIdMapping, containsExpression, evaluateAttributeToString, evaluateExpression, filter, filter, formatErrorString, formatString, getAttribute, getErrorsReport, getExpressionEvaluator, getJavaScriptUtils, getNearestForm, getNextId, getQualifiedBundleName, getScriptReporter, getTagName, getUserLocale, hasErrors, isExpression, prepForRendering, registerAttribute, registerError, registerTagError, release, removeAttribute, renderAttribute, renderAttributes, reportErrors, rewriteName, setPageContext, updateExpression, write |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue |
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, setParent |
EMPTY_STRING
protected static final String EMPTY_STRING
- See Also:
- Constant Field Values
StructuredBaseTag
public StructuredBaseTag()
addContent
public void addContent(String content)
- Add content to the content that is being buffered by this tag. All tags write their body
content to this content buffer, which is rendered at the end of the tag's lifecycle if
no fatal errors have occurred during this tag's lifecycle.
- Parameters:
content
- content that this tag should render.
getContent
public String getContent()
- Get the content which should be rendered by this tag.
- Returns:
- the content String if there is content; null otherwise
doStartTag
public int doStartTag()
throws javax.servlet.jsp.JspException
- Starts a tag's lifecycle. This method performs several operations before
invoking the @see renderStartTag(int) method. In order, these stages are:
- @see verifyStructure()
- @see prepare()
- @see verifyAttributes()
- @see renderStartTag(int)
The benefit of this lifecycle is that it provides a structure for component
tags that are immediately nested inside of repeating tags.
Any errors that occur before calling @see renderStartTag(int) are reported
in the page.
- Specified by:
doStartTag
in interface javax.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in class javax.servlet.jsp.tagext.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:
javax.servlet.jsp.JspException
doEndTag
public int doEndTag()
throws javax.servlet.jsp.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 javax.servlet.jsp.tagext.Tag
- Overrides:
doEndTag
in class javax.servlet.jsp.tagext.BodyTagSupport
- Returns:
- EVAL_PAGE
- Throws:
javax.servlet.jsp.JspException
- if an error that occurred that could not be reported to the page
localRelease
protected void localRelease()
- Reset all of the fields of this tag.
- Overrides:
localRelease
in class AbstractBaseTag
getCurrentRenderState
protected abstract int getCurrentRenderState()
renderStartTag
protected abstract int renderStartTag(int state)
throws javax.servlet.jsp.JspException
- Throws:
javax.servlet.jsp.JspException
renderEndTag
protected abstract int renderEndTag(int state)
throws javax.servlet.jsp.JspException
- Throws:
javax.servlet.jsp.JspException
getValidContainerType
protected abstract Class getValidContainerType()
prepare
protected void prepare()
verifyAttributes
protected void verifyAttributes()
throws javax.servlet.jsp.JspException
- Throws:
javax.servlet.jsp.JspException
verifyStructure
protected final void verifyStructure()
throws javax.servlet.jsp.JspException
- Throws:
javax.servlet.jsp.JspException