public abstract class

AbstractHtmlElementBodyTag

extends AbstractHtmlElementTag
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
Known Direct Subclasses

Class Overview

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).

Summary

[Expand]
Inherited Constants
From class org.springframework.web.servlet.tags.form.AbstractHtmlElementTag
From class org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag
From class org.springframework.web.servlet.tags.RequestContextAwareTag
[Expand]
Inherited Fields
From class org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag
From class org.springframework.web.servlet.tags.RequestContextAwareTag
Public Constructors
AbstractHtmlElementBodyTag()
Public Methods
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()
void setBodyContent(BodyContent bodyContent)
Protected Methods
void exposeAttributes()
Called during writeTagContent(TagWriter) allowing subclasses to add any attributes to the javax.servlet.jsp.PageContext as needed.
void flushBufferedBodyContent(BodyContent bodyContent)
The user customised the output of the error messages - flush the buffered content into the main javax.servlet.jsp.JspWriter.
void onWriteTagContent()
Called at the start of writeTagContent(TagWriter) allowing subclasses to perform any precondition checks or setup tasks that might be necessary.
void removeAttributes()
Called by doFinally() allowing subclasses to remove any attributes from the javax.servlet.jsp.PageContext as needed.
abstract void renderDefaultContent(TagWriter tagWriter)
void renderFromBodyContent(BodyContent bodyContent, TagWriter tagWriter)
Render the tag contents based on the supplied BodyContent.
boolean shouldRender()
Should rendering of this tag proceed at all.
int writeTagContent(TagWriter tagWriter)
Subclasses should implement this method to perform tag content rendering.
[Expand]
Inherited Methods
From class org.springframework.web.servlet.tags.form.AbstractHtmlElementTag
From class org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag
From class org.springframework.web.servlet.tags.form.AbstractFormTag
From class org.springframework.web.servlet.tags.HtmlEscapingAwareTag
From class org.springframework.web.servlet.tags.RequestContextAwareTag
From class java.lang.Object
From interface org.springframework.web.servlet.tags.EditorAwareTag

Public Constructors

public AbstractHtmlElementBodyTag ()

Public Methods

public int doEndTag ()

If rendering, flush any buffered BodyContent or, if no BodyContent is supplied, render the default content.

Returns
  • Tag#EVAL_PAGE
Throws
JspException

public void doFinally ()

Clean up any attributes and stored resources.

public void doInitBody ()

Throws
JspException

public void setBodyContent (BodyContent bodyContent)

Protected Methods

protected void exposeAttributes ()

Called during writeTagContent(TagWriter) allowing subclasses to add any attributes to the javax.servlet.jsp.PageContext as needed.

Throws
JspException

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.

Throws
JspException

protected void onWriteTagContent ()

Called at the start of writeTagContent(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)

Throws
JspException

protected void renderFromBodyContent (BodyContent bodyContent, TagWriter tagWriter)

Render the tag contents based on the supplied 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.

Throws
JspException

protected boolean shouldRender ()

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.

Throws
JspException

protected int writeTagContent (TagWriter tagWriter)

Subclasses should implement this method to perform tag content rendering.

Returns
  • valid tag render instruction as per javax.servlet.jsp.tagext.Tag#doStartTag().
Throws
JspException