类 AbstractHtmlElementBodyTag
- java.lang.Object
- javax.servlet.jsp.tagext.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
- 所有已实现的接口:
Serializable
,BodyTag
,DynamicAttributes
,IterationTag
,JspTag
,Tag
,TryCatchFinally
,EditorAwareTag
public abstract class AbstractHtmlElementBodyTag extends AbstractHtmlElementTag implements BodyTag
Convenient super class for many html tags that render content using the databinding features of theAbstractHtmlElementTag
. The only thing sub-tags need to do is overriderenderDefaultContent(TagWriter)
.- 从以下版本开始:
- 2.0
- 作者:
- Rob Harrop, Juergen Hoeller
- 另请参阅:
- 序列化表格
字段概要
从类继承的字段 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
从类继承的字段 org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag
NESTED_PATH_VARIABLE_NAME
从类继承的字段 org.springframework.web.servlet.tags.RequestContextAwareTag
logger, REQUEST_CONTEXT_PAGE_ATTRIBUTE
从类继承的字段 javax.servlet.jsp.tagext.TagSupport
pageContext
从接口继承的字段 javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
从接口继承的字段 javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
从接口继承的字段 javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
构造器概要
构造器 构造器 说明 AbstractHtmlElementBodyTag()
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 int
doEndTag()
Ifrendering
, flush any bufferedBodyContent
or, if noBodyContent
is supplied,render the default content
.void
doFinally()
Clean up any attributes and stored resources.void
doInitBody()
protected void
exposeAttributes()
Called duringwriteTagContent(org.springframework.web.servlet.tags.form.TagWriter)
allowing subclasses to add any attributes to thePageContext
as needed.protected void
flushBufferedBodyContent(BodyContent bodyContent)
The user customised the output of the error messages - flush the buffered content into the mainJspWriter
.protected void
onWriteTagContent()
Called at the start ofwriteTagContent(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 bydoFinally()
allowing subclasses to remove any attributes from thePageContext
as needed.protected abstract void
renderDefaultContent(TagWriter tagWriter)
protected void
renderFromBodyContent(BodyContent bodyContent, TagWriter tagWriter)
Render the tag contents based on the suppliedBodyContent
.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.从类继承的方法 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
从类继承的方法 org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag
autogenerateId, convertToDisplayString, getBindStatus, getBoundValue, getEditor, getId, getName, getNestedPath, getPath, getPropertyEditor, getPropertyPath, processFieldValue, resolveId, setId, setPath
从类继承的方法 org.springframework.web.servlet.tags.form.AbstractFormTag
createTagWriter, doStartTagInternal, evaluate, getDisplayString, getDisplayString, isDefaultHtmlEscape, writeOptionalAttribute
从类继承的方法 org.springframework.web.servlet.tags.HtmlEscapingAwareTag
htmlEscape, isHtmlEscape, isResponseEncodedHtmlEscape, setHtmlEscape
从类继承的方法 org.springframework.web.servlet.tags.RequestContextAwareTag
doCatch, doStartTag, getRequestContext
从类继承的方法 javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getParent, getValue, getValues, release, removeValue, setPageContext, setParent, setValue
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 javax.servlet.jsp.tagext.IterationTag
doAfterBody
从接口继承的方法 javax.servlet.jsp.tagext.Tag
doStartTag, getParent, release, setPageContext, setParent
构造器详细资料
AbstractHtmlElementBodyTag
public AbstractHtmlElementBodyTag()
方法详细资料
writeTagContent
protected int writeTagContent(TagWriter tagWriter) throws JspException
从类复制的说明:AbstractFormTag
Subclasses should implement this method to perform tag content rendering.- 指定者:
writeTagContent
在类中AbstractFormTag
- 返回:
- valid tag render instruction as per
Tag.doStartTag()
. - 抛出:
JspException
doEndTag
public int doEndTag() throws JspException
Ifrendering
, flush any bufferedBodyContent
or, if noBodyContent
is supplied,render the default content
.- 指定者:
doEndTag
在接口中Tag
- 覆盖:
doEndTag
在类中TagSupport
- 返回:
- a
Tag.EVAL_PAGE
result - 抛出:
JspException
renderFromBodyContent
protected void renderFromBodyContent(BodyContent bodyContent, TagWriter tagWriter) throws JspException
Render the tag contents based on the suppliedBodyContent
.The default implementation simply
flushes
theBodyContent
directly to the output. Subclasses may choose to override this to add additional content to the output.- 抛出:
JspException
doFinally
public void doFinally()
Clean up any attributes and stored resources.- 指定者:
doFinally
在接口中TryCatchFinally
- 覆盖:
doFinally
在类中AbstractDataBoundFormElementTag
onWriteTagContent
protected void onWriteTagContent()
Called at the start ofwriteTagContent(org.springframework.web.servlet.tags.form.TagWriter)
allowing subclasses to perform any precondition checks or setup tasks that might be necessary.
shouldRender
protected boolean shouldRender() throws JspException
Should rendering of this tag proceed at all. Returns 'true
' by default causing rendering to occur always, Subclasses can override this if they provide conditional rendering.- 抛出:
JspException
exposeAttributes
protected void exposeAttributes() throws JspException
Called duringwriteTagContent(org.springframework.web.servlet.tags.form.TagWriter)
allowing subclasses to add any attributes to thePageContext
as needed.- 抛出:
JspException
removeAttributes
protected void removeAttributes()
Called bydoFinally()
allowing subclasses to remove any attributes from thePageContext
as needed.
flushBufferedBodyContent
protected void flushBufferedBodyContent(BodyContent bodyContent) throws JspException
The user customised the output of the error messages - flush the buffered content into the mainJspWriter
.- 抛出:
JspException
renderDefaultContent
protected abstract void renderDefaultContent(TagWriter tagWriter) throws JspException
- 抛出:
JspException
doInitBody
public void doInitBody() throws JspException
- 指定者:
doInitBody
在接口中BodyTag
- 抛出:
JspException
setBodyContent
public void setBodyContent(BodyContent bodyContent)
- 指定者:
setBodyContent
在接口中BodyTag