|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectSimpleTagSupport
AbstractSimpleTag
AbstractDataGridHtmlTag
public abstract class AbstractDataGridHtmlTag
This class is a base class for all data grid tags that render HTML output for the grid. This base
class provides services to its subclasses including lookup of the DataGridTagModel
for the
current data grid. In addition, this class exposes tagId generation functionality. These methods
are used to create strings that will be written onto HTML tags for the "id" or "name" attributes.
Such identifiers can be created in one of two ways -- indexed or un-indexed. An un-indexed tag
identifier is one that the page author is responsible for making unique within a given
scope in the rendered output. An indexed tag identifier is one that the data grid will suffix
with the index for the current row in the grid. This is used to help create unique identifiers
from JSP tags that are rendered repeatedly. For example, a SpanCell
renders an HTML
<span> tag; with its tagId
attribute set, it will render a tag identifier for
every row in the page. The indexed is added as a suffix in order to help page authors create
more unique identifiers. Ultimately, the page author is responsible for ensuring that their
tag identifiers are unique within a scope.
Constructor Summary | |
---|---|
AbstractDataGridHtmlTag()
|
Method Summary | |
---|---|
protected void |
applyIndexedTagId(AbstractHtmlState state,
String tagId)
Create an indexed tag identifier given a state object and a base tag identifier. |
protected void |
applyTagId(AbstractHtmlState state,
String tagId)
Create an un-indexed tag identifier for the given state object. |
protected DataGridTagModel |
lookupDataGridTagModel()
Get the DataGridTagModel for the data grid. |
protected String |
renderDefaultNameAndId(HttpServletRequest request,
AbstractHtmlState state,
String id,
String name)
|
protected String |
renderNameAndId(HttpServletRequest request,
AbstractHtmlState state,
Form parentForm)
Generate a name and id given a AbstractHtmlState object. |
Methods inherited from class AbstractSimpleTag |
---|
getBufferBody, getHtmlTag, getIdForTagId, getInlineError, getPageContext, getScriptReporter, getTagName, getUserLocale, hasErrors, registerTagError, registerTagError, reportErrors, rewriteName, setNonEmptyValueAttribute, setRequiredValueAttribute, write |
Methods inherited from class SimpleTagSupport |
---|
doTag, findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractDataGridHtmlTag()
Method Detail |
---|
protected final DataGridTagModel lookupDataGridTagModel()
DataGridTagModel
for the data grid.
protected final void applyIndexedTagId(AbstractHtmlState state, String tagId) throws JspException
tagId
will have the index of the current item in the data grid attached as a suffix to the
the given base identifier.
state
- the AbstractHtmlState
upon which the tag identifier will be set once createdtagId
- the base tag identifier name
JspException
protected final void applyTagId(AbstractHtmlState state, String tagId) throws JspException
state
- the AbstractHtmlState
upon which the tag identifier will be set once createdtagId
- the base tag identifier
JspException
protected final String renderNameAndId(HttpServletRequest request, AbstractHtmlState state, Form parentForm)
Generate a name and id given a AbstractHtmlState
object. Data grid callers may invoke this
method with subclasses rendering markup containing tags that must set HTML tag IDs for use
via JavaScript on the client.
Assumptions:
state
- the HTML state whose tag id to setparentForm
- a Form
tag if one contains this tag
null
if no script must be rendered.protected String renderDefaultNameAndId(HttpServletRequest request, AbstractHtmlState state, String id, String name)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |