|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object TagSupport org.springframework.web.servlet.tags.RequestContextAwareTag org.springframework.web.servlet.tags.HtmlEscapingAwareTag org.springframework.web.servlet.tags.form.AbstractFormTag org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag org.springframework.web.servlet.tags.form.AbstractHtmlElementTag org.springframework.web.servlet.tags.form.AbstractHtmlElementBodyTag
public abstract class AbstractHtmlElementBodyTag
Convenient super class for many html tags that render content using the databinding
features of the AbstractHtmlElementTag
. The only thing sub tags
need to do is override renderDefaultContent(TagWriter)
.
Field Summary | |
---|---|
private BodyContent |
bodyContent
|
private TagWriter |
tagWriter
|
Fields inherited from class org.springframework.web.servlet.tags.form.AbstractHtmlElementTag |
---|
CLASS_ATTRIBUTE, DIR_ATTRIBUTE, LANG_ATTRIBUTE, ONCLICK_ATTRIBUTE, ONDBLCLICK_ATTRIBUTE, ONKEYDOWN_ATTRIBUTE, ONKEYPRESS_ATTRIBUTE, ONKEYUP_ATTRIBUTE, ONMOUSEDOWN_ATTRIBUTE, ONMOUSEMOVE_ATTRIBUTE, ONMOUSEOUT_ATTRIBUTE, ONMOUSEOVER_ATTRIBUTE, ONMOUSEUP_ATTRIBUTE, STYLE_ATTRIBUTE, TABINDEX_ATTRIBUTE, TITLE_ATTRIBUTE |
Fields inherited from class org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag |
---|
COMMAND_NAME_VARIABLE_NAME, NESTED_PATH_VARIABLE_NAME |
Fields inherited from class org.springframework.web.servlet.tags.RequestContextAwareTag |
---|
logger, REQUEST_CONTEXT_PAGE_ATTRIBUTE |
Constructor Summary | |
---|---|
AbstractHtmlElementBodyTag()
|
Method Summary | |
---|---|
int |
doEndTag()
If rendering , flush any buffered
BodyContent or, if no BodyContent is supplied,
render the default content . |
void |
doFinally()
Clean up any attributes and stored resources. |
void |
doInitBody()
|
protected void |
exposeAttributes()
Called during writeTagContent(org.springframework.web.servlet.tags.form.TagWriter) allowing subclasses to add any attributes to the
javax.servlet.jsp.PageContext as needed. |
protected void |
flushBufferedBodyContent(BodyContent bodyContent)
The user customised the output of the error messages - flush the buffered content into the main javax.servlet.jsp.JspWriter . |
protected void |
onWriteTagContent()
Called at the start of writeTagContent(org.springframework.web.servlet.tags.form.TagWriter) allowing subclasses to perform
any precondition checks or setup tasks that might be necessary. |
protected void |
removeAttributes()
Called by doFinally() allowing subclasses to remove any attributes from the
javax.servlet.jsp.PageContext as needed. |
protected abstract void |
renderDefaultContent(TagWriter tagWriter)
|
protected void |
renderFromBodyContent(BodyContent bodyContent,
TagWriter tagWriter)
Render the tag contents based on the supplied BodyContent . |
void |
setBodyContent(BodyContent bodyContent)
|
protected boolean |
shouldRender()
Should rendering of this tag proceed at all. |
protected int |
writeTagContent(TagWriter tagWriter)
Subclasses should implement this method to perform tag content rendering. |
Methods inherited from class org.springframework.web.servlet.tags.form.AbstractHtmlElementTag |
---|
getCssClass, getCssErrorClass, getCssStyle, getDir, getDynamicAttributes, getLang, getOnclick, getOndblclick, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getTabindex, getTitle, isValidDynamicAttribute, resolveCssClass, setCssClass, setCssErrorClass, setCssStyle, setDir, setDynamicAttribute, setLang, setOnclick, setOndblclick, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setTabindex, setTitle, writeDefaultAttributes, writeOptionalAttributes |
Methods inherited from class org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag |
---|
autogenerateId, convertToDisplayString, getBindStatus, getBoundValue, getEditor, getId, getName, getNestedPath, getPath, getPropertyEditor, getPropertyPath, processFieldValue, resolveId, setId, setPath |
Methods inherited from class org.springframework.web.servlet.tags.form.AbstractFormTag |
---|
createTagWriter, doStartTagInternal, evaluate, evaluateBoolean, getDisplayString, getDisplayString, isDefaultHtmlEscape, writeOptionalAttribute |
Methods inherited from class org.springframework.web.servlet.tags.HtmlEscapingAwareTag |
---|
isHtmlEscape, setHtmlEscape |
Methods inherited from class org.springframework.web.servlet.tags.RequestContextAwareTag |
---|
doCatch, doStartTag, getRequestContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private BodyContent bodyContent
private TagWriter tagWriter
Constructor Detail |
---|
public AbstractHtmlElementBodyTag()
Method Detail |
---|
protected int writeTagContent(TagWriter tagWriter) throws JspException
AbstractFormTag
writeTagContent
in class AbstractFormTag
javax.servlet.jsp.tagext.Tag#doStartTag()
.
JspException
public int doEndTag() throws JspException
rendering
, flush any buffered
BodyContent
or, if no BodyContent
is supplied,
render the default content
.
JspException
protected void renderFromBodyContent(BodyContent bodyContent, TagWriter tagWriter) throws JspException
BodyContent
.
The default implementation simply flushes
the BodyContent
directly to the output. Subclasses may choose to
override this to add additional content to the output.
JspException
public void doFinally()
doFinally
in class AbstractDataBoundFormElementTag
protected void onWriteTagContent()
writeTagContent(org.springframework.web.servlet.tags.form.TagWriter)
allowing subclasses to perform
any precondition checks or setup tasks that might be necessary.
protected boolean shouldRender() throws JspException
true
' by default
causing rendering to occur always, Subclasses can override this if they
provide conditional rendering.
JspException
protected void exposeAttributes() throws JspException
writeTagContent(org.springframework.web.servlet.tags.form.TagWriter)
allowing subclasses to add any attributes to the
javax.servlet.jsp.PageContext
as needed.
JspException
protected void removeAttributes()
doFinally()
allowing subclasses to remove any attributes from the
javax.servlet.jsp.PageContext
as needed.
protected void flushBufferedBodyContent(BodyContent bodyContent) throws JspException
javax.servlet.jsp.JspWriter
.
JspException
protected abstract void renderDefaultContent(TagWriter tagWriter) throws JspException
JspException
public void doInitBody() throws JspException
JspException
public void setBodyContent(BodyContent bodyContent)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |