|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectSimpleTagSupport
AbstractSimpleTag
AbstractDataGridHtmlTag
AbstractCell
public abstract class AbstractCell
Abstract base class for JSP tags that render data grid cells. This class provides support to subclasses in several areas:
FormatTag.Formatter which can optionally be used
by a subclass to perform formatting on content that is written to a rendered pageAbstractHtmlState instances used by subclasses.
| Constructor Summary | |
|---|---|
AbstractCell()
|
|
| Method Summary | |
|---|---|
void |
addFormatter(FormatTag.Formatter formatter)
Add a FormatTag.Formatter. |
protected void |
addStateAttribute(AbstractHtmlState state,
String name,
String value)
Add an HTML state attribute to a AbstractHtmlState object. |
protected void |
applyAttributes()
Utility method invoked during tag rendering. |
void |
doTag()
This method implements the rendering process for data grid cells. |
void |
formatterHasError()
Indicate that a formatter has reported an error so the formatter should output it's body text. |
protected abstract CellModel |
internalGetCellModel()
Abstract method implemented by subclasses. |
protected abstract void |
renderCell(AbstractRenderAppender appender)
Abstract method implemented by subclasses to perform cell-specific rendering. |
protected void |
renderEmptyCell(AbstractRenderAppender appender)
Utility method usable by subclasses that renders an HTML to represent an empty HTML table cell. |
| Methods inherited from class AbstractDataGridHtmlTag |
|---|
applyIndexedTagId, applyTagId, lookupDataGridTagModel, renderDefaultNameAndId, renderNameAndId |
| 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 |
|---|
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 AbstractCell()
| Method Detail |
|---|
public void addFormatter(FormatTag.Formatter formatter)
FormatTag.Formatter. Subclasses can optionally use the support formatting; formatters
are added to the CellModel associated with an instance of the subclass.
formatter - the formatter to addpublic void formatterHasError()
public void doTag()
throws JspException,
IOException
This method implements the rendering process for data grid cells. When the data grid's
rendering state is not DataGridTagModel.RENDER_STATE_START, this tag processes
its body. The tag performs the following steps in order:
applyAttributes() method to allow subclasses to apply attributes
to their CellModel instances at a well known time. Any errors in attribute checking
should be thrown here.CellModel associated with the data grid to the
JspContext under the key cellModel.renderCell(org.apache.beehive.netui.tags.rendering.AbstractRenderAppender). If content is
rendered when the body of the tag is rendered, it is written to the output stream.
CellModel instance. If an exception is thrown after the
CellModel is added to the JspContext, it the cell model
will still be removed from the JspContext.
doTag in interface SimpleTagdoTag in class SimpleTagSupportJspException
IOExceptionprotected abstract CellModel internalGetCellModel()
Abstract method implemented by subclasses. Implementers should return the CellModel associated
with the UI that is being rendered by the JSP tag.
CellModel
protected abstract void renderCell(AbstractRenderAppender appender)
throws IOException,
JspException
Abstract method implemented by subclasses to perform cell-specific rendering.
appender - the AbstractRenderAppender to which any output should be rendered
IOException
JspExceptionprotected void renderEmptyCell(AbstractRenderAppender appender)
appender - the AbstractRenderAppender to which any output should be rendered
protected void applyAttributes()
throws JspException
JspException - if application of attributes fails
protected final void addStateAttribute(AbstractHtmlState state,
String name,
String value)
throws JspException
Add an HTML state attribute to a AbstractHtmlState object. This method performs
checks on common attributes and sets their values on the state object or throws an exception.
For the HTML tags it is not legal to set the id or name attributes.
In addition, the base tag does
not allow facets to be set. If the attribute is legal it will be added to the
general expression map stored in the AbstractHtmlState of the tag.
state - the state object to which attributes are appliednname - the name of an attributevalue - the value of the attribute
JspException - when an error occurs setting the attribute on the state object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||