You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/05/15 23:49:15 UTC
svn commit: r170270 -
/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractCell.java
/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractHtmlTableCell.java
Author: ekoneil
Date: Sun May 15 14:49:14 2005
New Revision: 170270
URL: http://svn.apache.org/viewcvs?rev=170270&view=rev
Log:
Data grid Javadoc.
BB: self
DRT: NetUI pass
Modified:
incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractCell.java
incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractHtmlTableCell.java
Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractCell.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractCell.java?rev=170270&r1=170269&r2=170270&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractCell.java (original)
+++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractCell.java Sun May 15 14:49:14 2005
@@ -33,7 +33,16 @@
import org.apache.beehive.netui.util.logging.Logger;
/**
- * Abstract base class that provides support for rendering HTML table cells to tag subclasses.
+ * <p>
+ * Abstract base class for JSP tags that render data grid cells. This class provides support to
+ * subclasses in several areas:
+ * <ul>
+ * <li>formatting -- this class accepts instances of {@link Formatter} which can optionally be used
+ * by a subclass to perform formatting on content that is written to a rendered page</li>
+ * <li>applying attributes</li>
+ * <li>applying state attributes to {@link AbstractHtmlState} instances used by subclasses.
+ * </ul>
+ * </li>
*/
public abstract class AbstractCell
extends AbstractDataGridHtmlTag {
@@ -43,24 +52,47 @@
/* todo: switch onto ConstantRendering.NBSP */
private static final String EMPTY_CELL = " ";
+ /**
+ * Add a {@link Formatter}. Subclasses can optionally use the support formatting; formatters
+ * are added to the {@link CellModel} associated with an instance of the subclass.
+ * @param formatter the formatter to add
+ */
public void addFormatter(Formatter formatter) {
internalGetCellModel().addFormatter(formatter);
}
/**
- * Indicate that a formatter has reported an error so the formatter should output it's
- * body text.
+ * Indicate that a formatter has reported an error so the formatter should output it's body text.
*/
public void formatterHasError() {
/* todo: error reporting */
}
/**
+ * <p>
+ * This method implements the rendering process for data grid cells. When the data grid's
+ * rendering state is <b>not</b> {@link DataGridTagModel#RENDER_STATE_START}, this tag processes
+ * its body. The tag performs the following steps in order:
+ * <ol>
+ * <li>The tag invokes its {@link #applyAttributes()} method to allow subclasses to apply attributes
+ * to their {@link CellModel} instances at a well known time. Any errors in attribute checking
+ * should be thrown here.</li>
+ * <li>The tag adds the {@link CellModel} associated with the data grid to the
+ * {@link javax.servlet.jsp.JspContext} under the key <code>cellModel</code>.</li>
+ * <li>Rendering is performed by invoking
+ * {@link #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.
+ * </li>
+ * <li>The tag removes the {@link CellModel} instance. If an exception is thrown after the
+ * {@link CellModel} is added to the {@link javax.servlet.jsp.JspContext}, it the cell model
+ * will still be removed from the JspContext.</li>
+ * </ol>
+ * </p>
* @throws JspException
* @throws IOException
*/
public void doTag()
- throws JspException, IOException {
+ throws JspException, IOException {
DataGridTagModel dataGridModel = DataGridUtil.getDataGridTagModel(getJspContext());
assert dataGridModel != null;
@@ -99,18 +131,60 @@
return;
}
+ /**
+ * <p>
+ * Abstract method implemented by subclasses. Implementers should return the {@link CellModel} associated
+ * with the UI that is being rendered by the JSP tag.
+ * </p>
+ * @return the cell's {@link CellModel}
+ */
protected abstract CellModel internalGetCellModel();
- protected abstract void renderCell(AbstractRenderAppender appender) throws IOException, JspException;
+ /**
+ * <p>
+ * Abstract method implemented by subclasses to perform cell-specific rendering.
+ * </p>
+ * @param appender the {@link AbstractRenderAppender} to which any output should be rendered
+ * @throws IOException
+ * @throws JspException
+ */
+ protected abstract void renderCell(AbstractRenderAppender appender)
+ throws IOException, JspException;
+ /**
+ * Utility method usable by subclasses that renders an HTML &nbsp; to represent an empty HTML table cell.
+ * @param appender the {@link AbstractRenderAppender} to which any output should be rendered
+ */
protected void renderEmptyCell(AbstractRenderAppender appender) {
appender.append(EMPTY_CELL);
}
+ /**
+ * Utility method invoked during tag rendering. Subclasses should place attribute validation logic
+ * here.
+ * @throws JspException if application of attributes fails
+ */
protected void applyAttributes()
- throws JspException {
+ throws JspException {
}
+ /**
+ * <p>
+ * Add an HTML state attribute to a {@link AbstractHtmlState} object. This method performs
+ * checks on common attributes and sets their values on the state object or throws an exception.
+ * </p>
+ * <p>
+ * For the HTML tags it is not legal to set the <code>id</code> or <code>name</code> 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 <code>AbstractHtmlState</code> of the tag.
+ * </p>
+ *
+ * @param state the state object to which attributes are appliedn
+ * @param name the name of an attribute
+ * @param value the value of the attribute
+ * @throws JspException when an error occurs setting the attribute on the state object
+ */
protected final void addStateAttribute(AbstractHtmlState state, String name, String value)
throws JspException {
Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractHtmlTableCell.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractHtmlTableCell.java?rev=170270&r1=170269&r2=170270&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractHtmlTableCell.java (original)
+++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractHtmlTableCell.java Sun May 15 14:49:14 2005
@@ -38,7 +38,16 @@
import org.apache.beehive.netui.util.Bundle;
/**
- *
+ * <p>
+ * Abstract base class that supports rendering an HTML <td>. This tag should be used as the base class
+ * for all tags which render content during the data grid's {@link DataGridTagModel#RENDER_STATE_GRID} render
+ * state. Subclasses must implement the {@link #renderDataCellContents(org.apache.beehive.netui.tags.rendering.AbstractRenderAppender, String)}
+ * which will be invoked after the opening table cell tag and before the closing table cell tag.
+ * </p>
+ * <p>
+ * State attributes set via the <code>setCell*</code> methods are added to the attribute set used
+ * when rendering the <td> tag.
+ * </p>
*/
public abstract class AbstractHtmlTableCell
extends AbstractCell
@@ -50,20 +59,22 @@
private TdTag.State _cellState = new TdTag.State();
/**
- * @param sortExpression
- * @netui:attribute required="false" rtexprvalue="true"
- * @jsptagref.attributedescription [todo]
+ * Set the sort expression associated with this header cell.
+ * @param sortExpression the sort expression
+ * @jsptagref.attributedescription the sort expression associated with this header cell.
* @jsptagref.attributesyntaxvalue <i>string</i>
+ * @netui:attribute required="false" rtexprvalue="true"
*/
public void setSortExpression(String sortExpression) {
_sortExpression = sortExpression;
}
/**
- * @param filterExpression
- * @netui:attribute required="false" rtexprvalue="true"
- * @jsptagref.attributedescription [todo]
+ * The filter expression associated with this header cell
+ * @param filterExpression the filter expression
+ * @jsptagref.attributedescription the filter expression associated with this header cell
* @jsptagref.attributesyntaxvalue <i>string</i>
+ * @netui:attribute required="false" rtexprvalue="true"
*/
public void setFilterExpression(String filterExpression) {
_filterExpression = filterExpression;
@@ -77,10 +88,10 @@
*/
/**
- * Sets the onClick javascript event.
+ * Sets the onClick javascript event for the HTML table cell.
*
* @param onClick - the onClick event.
- * @jsptagref.attributedescription The onClick JavaScript event.
+ * @jsptagref.attributedescription The onClick JavaScript event for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_onClick</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onClick JavaScript event."
*/
@@ -89,10 +100,10 @@
}
/**
- * Sets the onDblClick javascript event.
+ * Sets the onDblClick javascript event for the HTML table cell.
*
* @param onDblClick - the onDblClick event.
- * @jsptagref.attributedescription The onDblClick JavaScript event.
+ * @jsptagref.attributedescription The onDblClick JavaScript event for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_onDblClick</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onDblClick JavaScript event."
*/
@@ -101,10 +112,10 @@
}
/**
- * Sets the onKeyDown javascript event.
+ * Sets the onKeyDown javascript event for the HTML table cell.
*
* @param onKeyDown - the onKeyDown event.
- * @jsptagref.attributedescription The onKeyDown JavaScript event.
+ * @jsptagref.attributedescription The onKeyDown JavaScript event for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_onKeyDown</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onKeyDown JavaScript event."
*/
@@ -113,10 +124,10 @@
}
/**
- * Sets the onKeyUp javascript event.
+ * Sets the onKeyUp javascript event for the HTML table cell.
*
* @param onKeyUp - the onKeyUp event.
- * @jsptagref.attributedescription The onKeyUp JavaScript event.
+ * @jsptagref.attributedescription The onKeyUp JavaScript event for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_onKeyUp</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onKeyUp JavaScript event."
*/
@@ -125,10 +136,10 @@
}
/**
- * Sets the onKeyPress javascript event.
+ * Sets the onKeyPress javascript event for the HTML table cell.
*
* @param onKeyPress - the onKeyPress event.
- * @jsptagref.attributedescription The onKeyPress JavaScript event.
+ * @jsptagref.attributedescription The onKeyPress JavaScript event for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_onKeyPress</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onKeyPress JavaScript event."
*/
@@ -137,10 +148,10 @@
}
/**
- * Sets the onMouseDown javascript event.
+ * Sets the onMouseDown javascript event for the HTML table cell.
*
* @param onMouseDown - the onMouseDown event.
- * @jsptagref.attributedescription The onMouseDown JavaScript event.
+ * @jsptagref.attributedescription The onMouseDown JavaScript event for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_onMouseDown</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onMouseDown JavaScript event."
*/
@@ -149,10 +160,10 @@
}
/**
- * Sets the onMouseUp javascript event.
+ * Sets the onMouseUp javascript event for the HTML table cell.
*
* @param onMouseUp - the onMouseUp event.
- * @jsptagref.attributedescription The onMouseUp JavaScript event.
+ * @jsptagref.attributedescription The onMouseUp JavaScript event for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_onMouseUp</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onMouseUp JavaScript event."
*/
@@ -161,10 +172,10 @@
}
/**
- * Sets the onMouseMove javascript event.
+ * Sets the onMouseMove javascript event for the HTML table cell.
*
* @param onMouseMove - the onMouseMove event.
- * @jsptagref.attributedescription The onMouseMove JavaScript event.
+ * @jsptagref.attributedescription The onMouseMove JavaScript event for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_onMouseMove</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onMouseMove JavaScript event."
*/
@@ -173,10 +184,10 @@
}
/**
- * Sets the onMouseOut javascript event.
+ * Sets the onMouseOut javascript event for the HTML table cell.
*
* @param onMouseOut - the onMouseOut event.
- * @jsptagref.attributedescription The onMouseOut JavaScript event.
+ * @jsptagref.attributedescription The onMouseOut JavaScript event for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_onMouseOut</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onMouseOut JavaScript event."
*/
@@ -185,10 +196,10 @@
}
/**
- * Sets the onMouseOver javascript event.
+ * Sets the onMouseOver javascript event for the HTML table cell.
*
* @param onMouseOver - the onMouseOver event.
- * @jsptagref.attributedescription The onMouseOver JavaScript event.
+ * @jsptagref.attributedescription The onMouseOver JavaScript event for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_onMouseOver</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onMouseOver JavaScript event."
*/
@@ -197,12 +208,12 @@
}
/**
- * Sets the style of the rendered html tag.
+ * Sets the style attribute for the HTML table cell.
*
* @param style - the html style.
- * @jsptagref.attributedescription The style.
+ * @jsptagref.attributedescription The style attribute for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_style</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The style."
+ * @netui:attribute required="false" rtexprvalue="true" description="The style attribute."
*/
public void setCellStyle(String style) {
if("".equals(style)) return;
@@ -211,10 +222,10 @@
}
/**
- * Sets the style class of the rendered html tag.
+ * Sets the style class attribute for the HTML table cell.
*
* @param styleClass - the html style class.
- * @jsptagref.attributedescription The style class.
+ * @jsptagref.attributedescription The style class attribute for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_style_class</i>
* @netui:attribute required="false" rtexprvalue="true" description="The style class."
*/
@@ -225,22 +236,22 @@
}
/**
- * Sets the value of the title attribute.
+ * Sets the value of the title attribute for the HTML table cell.
*
- * @param title
- * @jsptagref.attributedescription The title.
+ * @param title the title
+ * @jsptagref.attributedescription The title for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_title</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The title. "
+ * @netui:attribute required="false" rtexprvalue="true" description="The title."
*/
public void setCellTitle(String title) {
_cellState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.TITLE, title);
}
/**
- * Sets the value of the cell's rowspan attribute.
+ * Sets the rowspan attribute for the HTML table cell.
*
* @param rowSpan
- * @jsptagref.attributedescription The row span
+ * @jsptagref.attributedescription The row span attribute for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_rowspan</i>
* @netui:attribute required="false" rtexprvalue="true" description="The rowspan."
*/
@@ -249,10 +260,10 @@
}
/**
- * Sets the value of the cell's colspan attribute.
+ * Sets the colspan attribute of the HTML table cell.
*
* @param colSpan
- * @jsptagref.attributedescription The colspan
+ * @jsptagref.attributedescription The colspan attribute of the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_colspan</i>
* @netui:attribute required="false" rtexprvalue="true" description="The colspan."
*/
@@ -261,10 +272,10 @@
}
/**
- * Sets the value of the horizontal align attribute.
+ * Sets the horizontal alignment of the HTML table cell.
*
* @param align
- * @jsptagref.attributedescription The horizontal alignment.
+ * @jsptagref.attributedescription The horizontal alignment of the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_align</i>
* @netui:attribute required="false" rtexprvalue="true" description="The cell's horizontal alignment"
*/
@@ -274,10 +285,10 @@
}
/**
- * Sets the value of the horizontal alignment character attribute.
+ * Sets the value of the horizontal alignment character attribute for the HTML table cell.
*
* @param alignChar
- * @jsptagref.attributedescription The horizontal alignment character.
+ * @jsptagref.attributedescription The horizontal alignment character for the HTML table cell
* @jsptagref.attributesyntaxvalue <i>string_alignChar</i>
* @netui:attribute required="false" rtexprvalue="true" description="The cell's horizontal alignment character"
*/
@@ -286,10 +297,10 @@
}
/**
- * Sets the value of the horizontal alignment character offset attribute.
+ * Sets the value of the horizontal alignment character offset attribute for the HTML table cell.
*
* @param alignCharOff
- * @jsptagref.attributedescription The horizontal alignment character offset
+ * @jsptagref.attributedescription The horizontal alignment character offset for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_alignCharOff</i>
* @netui:attribute required="false" rtexprvalue="true" description="The cell's horizontal alignment character offset"
*/
@@ -298,10 +309,10 @@
}
/**
- * Sets the value of the vertical alignment attribute.
+ * Sets the value of the vertical alignment attribute for the HTML table cell.
*
* @param align
- * @jsptagref.attributedescription The vertical alignment.
+ * @jsptagref.attributedescription The vertical alignment for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_align</i>
* @netui:attribute required="false" rtexprvalue="true" description="The cell's vertical alignment"
*/
@@ -311,10 +322,10 @@
}
/**
- * Sets the value of the language attribute.
+ * Sets the value of the language attribute for the HTML table cell.
*
* @param lang
- * @jsptagref.attributedescription The language.
+ * @jsptagref.attributedescription The language for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_lang</i>
* @netui:attribute required="false" rtexprvalue="true" description="The cell's language"
*/
@@ -323,10 +334,10 @@
}
/**
- * Sets the value of the text direction attribute.
+ * Sets the value of the text direction attribute for the HTML table cell.
*
* @param dir
- * @jsptagref.attributedescription The text direction attribute.
+ * @jsptagref.attributedescription The text direction attribute for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_dir</i>
* @netui:attribute required="false" rtexprvalue="true" description="The cell's text direction"
*/
@@ -335,10 +346,10 @@
}
/**
- * Sets the value of the abbreviated form of the cell's content.
+ * Sets the value of the abbreviated form of the HTML table cell's content.
*
* @param abbr
- * @jsptagref.attributedescription The abbreviated form of the cell's content.
+ * @jsptagref.attributedescription The abbreviated form of the HTML table cell's content.
* @jsptagref.attributesyntaxvalue <i>string_dir</i>
* @netui:attribute required="false" rtexprvalue="true" description="The abbreviated form of the cell's content"
*/
@@ -347,10 +358,10 @@
}
/**
- * Sets the value of the axis attribute.
+ * Sets the value of the axis attribute for the HTML table cell.
*
* @param axis
- * @jsptagref.attributedescription The axis attribute.
+ * @jsptagref.attributedescription The axis attribute for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_axis</i>
* @netui:attribute required="false" rtexprvalue="true" description="The axis attribute"
*/
@@ -359,10 +370,10 @@
}
/**
- * Sets the value of the headers attribute.
+ * Sets the value of the headers attribute for the HTML table cell.
*
* @param headers
- * @jsptagref.attributedescription The headers attribute.
+ * @jsptagref.attributedescription The headers attribute for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_headers</i>
* @netui:attribute required="false" rtexprvalue="true" description="The headers attribute"
*/
@@ -371,10 +382,10 @@
}
/**
- * Sets the value of the scope attribute.
+ * Sets the value of the scope attribute for the HTML table cell.
*
* @param scope
- * @jsptagref.attributedescription The scope attribute.
+ * @jsptagref.attributedescription The scope attribute for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_scope</i>
* @netui:attribute required="false" rtexprvalue="true" description="The scope attribute"
*/
@@ -383,10 +394,12 @@
}
/**
- * Set the name of the tagId for the td.
+ * Set the name of the tagId for the HTML table cell. The user is responsible for ensuring that
+ * this tag id is unique in the rendered page.
*
- * @param tagId - the the name of the tagId for the td.
- * @jsptagref.attributedescription The tagId.
+ * @param tagId the tag id
+ * @jsptagref.attributedescription The tagId for the HTML table cell. The user is responsible for
+ * ensuring that this tag id is unique in the rendered page.
* @jsptagref.attributesyntaxvalue <i>string_tagId</i>
* @netui:attribute required="false" rtexprvalue="true"
* description="String value. Sets the id (or name) attribute of the rendered HTML tag. "
@@ -397,15 +410,17 @@
}
/**
- * Base support for the <code>attribute</code> tag. This requires that the tag buffer their body and
- * write attribute in the end tag. For the HTML tags it is not legal to set
- * the <code>id</code> or <code>name</code> 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 <code>AbstractHtmlState</code> of the tag.
+ * <p>
+ * Base support for setting attributes on a tag via the {@link IAttributeConsumer} interface. The
+ * AbstractHtmlTableCell does not support any attributes by default. Attributes set via this interface
+ * are used to extend the HTML attributes exposed through the JSP tags themselves. This allows
+ * tag users to add arbitrary attributes to the HTML tags rendered by the data grid.
+ * </p>
*
- * @param name The name of the attribute. This value may not be null or the empty string.
- * @param value The value of the attribute. This may contain an expression.
+ * @param name The name of the attribute.
+ * @param value The value of the attribute.
* @param facet The name of a facet to which the attribute will be applied. This is optional.
+ * @throws JspException
*/
public void setAttribute(String name, String value, String facet)
throws JspException {
@@ -413,12 +428,47 @@
throw new JspException(s);
}
+ /**
+ * <p>
+ * Base support for setting behavior values via the {@link IBehaviorConsumer} interface. The
+ * AbstractHtmlTableCell does not support any attributes by default. Attributes set via this
+ * interface are used to configure internal functionality of the tags which is not exposed
+ * via JSP tag attributes.
+ * </p>
+ * @param name the name of the behavior
+ * @param value the value of the behavior
+ * @param facet the name of a facet of the tag to which the behavior will be applied. This is optional.
+ * @throws JspException
+ */
public void setBehavior(String name, Object value, String facet)
throws JspException {
String s = Bundle.getString("Tags_BehaviorFacetNotSupported", new Object[]{facet});
throw new JspException(s);
}
+ /**
+ * <p>
+ * Base HTML table cell rendering functionality which opens and closes the HTML <td> tags with
+ * the correct style and attribute information. Between the table cell tags, the tag
+ * calls the {@link #renderDataCellContents(org.apache.beehive.netui.tags.rendering.AbstractRenderAppender, String)}
+ * method so that subclasses implementing this method can provide content inside of the table cell.
+ * </p>
+ * <p>
+ * The style information rendered here includes the following in order:
+ * <ol>
+ * <li>the {@link org.apache.beehive.netui.databinding.datagrid.api.rendering.StyleModel#getDataCellFilteredClass()}
+ * if the cell has a filter expression and is filtered
+ * </li>
+ * <li>the {@link org.apache.beehive.netui.databinding.datagrid.api.rendering.StyleModel#getDataCellSortedClass()}
+ * if the cell has a sort expression and is sorted
+ * <li>the {@link #setCellStyleClass(String)} attribute if set;
+ * {@link org.apache.beehive.netui.databinding.datagrid.api.rendering.StyleModel#getDataCellClass()} otherwise</li>
+ * </ol>
+ * </p>
+ * @param appender the {@link AbstractRenderAppender} to which any output should be rendered
+ * @throws IOException
+ * @throws JspException
+ */
protected void renderCell(AbstractRenderAppender appender)
throws IOException, JspException {
@@ -468,6 +518,15 @@
}
+ /**
+ * <p>
+ * Abstract method implemented by subclasses in order to render a cell's content.
+ * </p>
+ * @param appender the {@link AbstractRenderAppender} to which any output should be rendered
+ * @param output the output produced from having evaluated this tag's {@link JspFragment}
+ * @throws IOException
+ * @throws JspException
+ */
protected abstract void renderDataCellContents(AbstractRenderAppender appender, String output)
throws IOException, JspException;
}