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/16 06:20:56 UTC
svn commit: r170300 [2/2] - in
/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid:
AbstractCell.java AbstractDataGridHtmlTag.java AbstractHtmlTableCell.java
AnchorCell.java Caption.java DataGrid.java GetDataGridState.java
HeaderCell.java ImageAnchorCell.java Row.java TemplateCell.java
Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/ImageAnchorCell.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/ImageAnchorCell.java?rev=170300&r1=170299&r2=170300&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/ImageAnchorCell.java (original)
+++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/ImageAnchorCell.java Sun May 15 21:20:54 2005
@@ -35,6 +35,18 @@
/**
* <p>
+ * This tag is a data grid cell used to render an HTML image inside of an anchor. This tag should be used
+ * inside of a <netui-data:rows> tag when rendering a data set with the <netui-data:dataGrid> tag.
+ * The rendered output is structured as:
+ * <pre>
+ * <a ...><img .../></a>
+ * </pre>
+ * If the {@link #setHref(String)} attribute is set, the href will be rendered on the anchor. If the {@link #setAction(String)}
+ * attribute is set, it must reference an action that is valid in the context of the current Page Flow. Only
+ * one of these two attributes may be set. The image source to render on the image tag is specified using the
+ * {@link #setSrc(String)} attribute.
+ * </p>
+ * <p>
* The set of JSP implicit objects available to the body include:
* <ul>
* <li><code>dataGridModel</code> -- the {@link org.apache.beehive.netui.databinding.datagrid.api.rendering.DataGridTagModel}
@@ -45,6 +57,7 @@
* </p>
*
* @jsptagref.tagdescription
+ *
* @netui:tag name="imageAnchorCell" body-content="scriptless"
* description="Renders an HTML table cell in a data grid that contains an HTML image inside of an anchor."
*/
@@ -567,6 +580,25 @@
applyIndexedTagId(_anchorState, tagId);
}
+ /**
+ * <p>
+ * Implementation of the {@link org.apache.beehive.netui.tags.IAttributeConsumer} interface. This
+ * allows users of this tag to extend the attribute set that is rendered by the HTML image or
+ * anchor tags. This method accepts the following facets:
+ * <table>
+ * <tr><td>Facet Name</td><td>Operation</td></tr>
+ * <tr><td><code>anchor</code></td><td>Adds an attribute with the provided <code>name</code> and <code>value</code> to the
+ * attributes rendered on the <a> tag.</td></tr>
+ * <tr><td><code>image</code></td><td>Adds an attribute with the provided <code>name</code> and <code>value</code> to the
+ * attributes rendered on the <img> tag.</td></tr>
+ * </table>
+ * This tag defaults to the setting attributes on the anchor when the facet name is unset.
+ * </p>
+ * @param name the name of the attribute
+ * @param value the value of the attribute
+ * @param facet the facet for the attribute
+ * @throws JspException thrown when the facet is not recognized
+ */
public void setAttribute(String name, String value, String facet)
throws JspException {
if(facet == null || facet.equals(ANCHOR_FACET_NAME))
@@ -577,11 +609,37 @@
super.setAttribute(name, value, facet);
}
+ /**
+ * <p>
+ * Implementation of the {@link IUrlParams} interface. This allows this tag to accept <netui:parameter>
+ * and <netui:parameterMap> in order to add URL parameters onto the rendered anchor. For example:
+ * <pre>
+ * <netui-data:imageAnchorCell href="foo.jsp" src="foo.png">
+ * <netui:parameter name="paramKey" value="paramValue"/>
+ * </netui-data:anchorCell>
+ * </pre>
+ * will render an HTML image anchor as:
+ * <pre>
+ * <a href="foo.jsp?paramKey=paramValue><img src="foo.png"/></a>
+ * </pre>
+ * </p>
+ * @param name the name of the parameter
+ * @param value the value of the parameter
+ * @param facet the facet for the parameter
+ * @throws JspException thrown when the facet is unsupported
+ */
public void addParameter(String name, Object value, String facet)
throws JspException {
ParamHelper.addParam(_imageAnchorCellModel.getParams(), name, value);
}
+ /**
+ * Render the contents of the HTML anchor and image. This method calls to an
+ * {@link org.apache.beehive.netui.databinding.datagrid.api.rendering.CellDecorator} associated with this tag.
+ * The result of renderingi is appended to the <code>appender</code>
+ * @param appender the {@link AbstractRenderAppender} to which output should be rendered
+ * @param jspFragmentOutput the result of having evaluated this tag's {@link javax.servlet.jsp.tagext.JspFragment}
+ */
protected void renderDataCellContents(AbstractRenderAppender appender, String jspFragmentOutput) {
assert DECORATOR != null;
assert appender != null;
@@ -616,4 +674,4 @@
protected CellModel internalGetCellModel() {
return _imageAnchorCellModel;
}
-}
+}
\ No newline at end of file
Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Row.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Row.java?rev=170300&r1=170299&r2=170300&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Row.java (original)
+++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Row.java Sun May 15 21:20:54 2005
@@ -37,8 +37,59 @@
import org.apache.beehive.netui.util.internal.InternalStringBuilder;
/**
- * @jsptagref.tagdescription Sets HTML attributes on data grid table rows.
- * @netui:tag name="row" body-content="scriptless" description="Sets HTML attributes on data grid table rows"
+ * <p>
+ * This tag is optionally used to render HTML table roe tags inside of one of the data grid tags that
+ * are used to denote data grid row rendering boundaries. When the {@link Header}, {@link Rows}, or {@link Footer}
+ * have their <code>renderRow</code> attribute set to <code>false</code>, no HTML table row element will render
+ * before starting to render the body of one of these tags. This tag should be used when <code>renderRows</code>
+ * is <code>false</code> in order to render an HTML table row. The Row tag is used this way in order to
+ * allow a page author to set JSP tag attributes that can configure each rendered table row differently.
+ * For example:
+ * <pre>
+ * <netui-data:rows renderRows="false">
+ * <netui-data:row styleClass="rowStyle${container.index}">
+ * <netui-data:spanCell value="${container.item}"/>
+ * </netui-data:row>
+ * </netui-data:rows>
+ * </pre>
+ * and a data set containing ["foo", "bar", "baz"] will render:
+ * <pre>
+ * <tr class="rowStyle0">foo</tr>
+ * <tr class="rowStyle1">bar</tr>
+ * <tr class="rowStyle2">baz</tr>
+ * </pre>
+ * If the <netui-data:row$gt; were omitted, none of the <tr> elements would be rendered in the output. Note,
+ * this tag <b>should not</b> be used inside of the Header, Rows, or Footer tags unless their <code>renderRow</code>
+ * attribute is set to <code>false</code>
+ * </p>
+ * @jsptagref.tagdescription
+ * <p>
+ * This tag is optionally used to render HTML table roe tags inside of one of the data grid tags that
+ * are used to denote data grid row rendering boundaries. When the {@link Header}, {@link Rows}, or {@link Footer}
+ * have their <code>renderRow</code> attribute set to <code>false</code>, no HTML table row element will render
+ * before starting to render the body of one of these tags. This tag should be used when <code>renderRows</code>
+ * is <code>false</code> in order to render an HTML table row. The Row tag is used this way in order to
+ * allow a page author to set JSP tag attributes that can configure each rendered table row differently.
+ * For example:
+ * <pre>
+ * <netui-data:rows renderRows="false">
+ * <netui-data:row styleClass="rowStyle${container.index}">
+ * <netui-data:spanCell value="${container.item}"/>
+ * </netui-data:row>
+ * </netui-data:rows>
+ * </pre>
+ * and a data set containing ["foo", "bar", "baz"] will render:
+ * <pre>
+ * <tr class="rowStyle0">foo</tr>
+ * <tr class="rowStyle1">bar</tr>
+ * <tr class="rowStyle2">baz</tr>
+ * </pre>
+ * If the <netui-data:row$gt; were omitted, none of the <tr> elements would be rendered in the output. Note,
+ * this tag <b>should not</b> be used inside of the Header, Rows, or Footer tags unless their <code>renderRow</code>
+ * attribute is set to <code>false</code>
+ * </p>
+ * @netui:tag name="row" body-content="scriptless"
+ * description="Tag optionally used inside of a Header, Rows, or Footer tag to render HTML table row elements."
*/
public class Row
extends AbstractDataGridHtmlTag {
@@ -50,143 +101,133 @@
}
/**
- * Sets the onClick JavaScript event.
+ * Sets the onClick JavaScript for the HTML tr tag.
*
* @param onClick the onClick event.
- * @jsptagref.attributedescription The onClick JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onClick JavaScript for the HTML tr tag.
* @jsptagref.attributesyntaxvalue <i>string_onClick</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The onClick JavaScript event."
+ * @netui:attribute required="false" rtexprvalue="true" description="The onClick JavaScript for the HTML tr tag."
*/
public void setOnClick(String onClick) {
_trState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONCLICK, onClick);
}
/**
- * Sets the onDblClick JavaScript event.
+ * Sets the onDblClick JavaScript for the HTML tr tag.
*
* @param onDblClick the onDblClick event.
- * @jsptagref.attributedescription The onDblClick JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onDblClick JavaScript for the HTML tr tag.
* @jsptagref.attributesyntaxvalue <i>string_onDblClick</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The onDblClick JavaScript event."
+ * @netui:attribute required="false" rtexprvalue="true" description="The onDblClick JavaScript for the HTML tr tag."
*/
public void setOnDblClick(String onDblClick) {
_trState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONDBLCLICK, onDblClick);
}
/**
- * Sets the onKeyDown JavaScript event.
+ * Sets the onKeyDown JavaScript for the HTML tr tag.
*
* @param onKeyDown the onKeyDown event.
- * @jsptagref.attributedescription The onKeyDown JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onKeyDown JavaScript for the HTML tr tag.
* @jsptagref.attributesyntaxvalue <i>string_onKeyDown</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The onKeyDown JavaScript event."
+ * @netui:attribute required="false" rtexprvalue="true" description="The onKeyDown JavaScript for the HTML tr tag."
*/
public void setOnKeyDown(String onKeyDown) {
_trState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONKEYDOWN, onKeyDown);
}
/**
- * Sets the onKeyUp JavaScript event.
+ * Sets the onKeyUp JavaScript for the HTML tr tag.
*
* @param onKeyUp the onKeyUp event.
- * @jsptagref.attributedescription The onKeyUp JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onKeyUp JavaScript for the HTML tr tag.
* @jsptagref.attributesyntaxvalue <i>string_onKeyUp</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The onKeyUp JavaScript event."
+ * @netui:attribute required="false" rtexprvalue="true" description="The onKeyUp JavaScript for the HTML tr tag."
*/
public void setOnKeyUp(String onKeyUp) {
_trState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONKEYUP, onKeyUp);
}
/**
- * Sets the onKeyPress JavaScript event.
+ * Sets the onKeyPress JavaScript for the HTML tr tag.
*
* @param onKeyPress the onKeyPress event.
- * @jsptagref.attributedescription The onKeyPress JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onKeyPress JavaScript for the HTML tr tag.
* @jsptagref.attributesyntaxvalue <i>string_onKeyPress</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The onKeyPress JavaScript event."
+ * @netui:attribute required="false" rtexprvalue="true" description="The onKeyPress JavaScript for the HTML tr tag."
*/
public void setOnKeyPress(String onKeyPress) {
_trState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONKEYPRESS, onKeyPress);
}
/**
- * Sets the onMouseDown JavaScript event.
+ * Sets the onMouseDown JavaScript for the HTML tr tag.
*
* @param onMouseDown the onMouseDown event.
- * @jsptagref.attributedescription The onMouseDown JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onMouseDown JavaScript for the HTML tr tag.
* @jsptagref.attributesyntaxvalue <i>string_onMouseDown</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The onMouseDown JavaScript event."
+ * @netui:attribute required="false" rtexprvalue="true" description="The onMouseDown JavaScript for the HTML tr tag."
*/
public void setOnMouseDown(String onMouseDown) {
_trState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEDOWN, onMouseDown);
}
/**
- * Sets the onMouseUp JavaScript event.
+ * Sets the onMouseUp JavaScript for the HTML tr tag.
*
* @param onMouseUp the onMouseUp event.
- * @jsptagref.attributedescription The onMouseUp JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onMouseUp JavaScript for the HTML tr tag.
* @jsptagref.attributesyntaxvalue <i>string_onMouseUp</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The onMouseUp JavaScript event."
+ * @netui:attribute required="false" rtexprvalue="true" description="The onMouseUp JavaScript for the HTML tr tag."
*/
public void setOnMouseUp(String onMouseUp) {
_trState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEUP, onMouseUp);
}
/**
- * Sets the onMouseMove JavaScript event.
+ * Sets the onMouseMove JavaScript for the HTML tr tag.
*
* @param onMouseMove the onMouseMove event.
- * @jsptagref.attributedescription The onMouseMove JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onMouseMove JavaScript for the HTML tr tag.
* @jsptagref.attributesyntaxvalue <i>string_onMouseMove</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The onMouseMove JavaScript event."
+ * @netui:attribute required="false" rtexprvalue="true" description="The onMouseMove JavaScript for the HTML tr tag."
*/
public void setOnMouseMove(String onMouseMove) {
_trState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEMOVE, onMouseMove);
}
/**
- * Sets the onMouseOut JavaScript event.
+ * Sets the onMouseOut JavaScript for the HTML tr tag.
*
* @param onMouseOut the onMouseOut event.
- * @jsptagref.attributedescription The onMouseOut JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onMouseOut JavaScript for the HTML tr tag.
* @jsptagref.attributesyntaxvalue <i>string_onMouseOut</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The onMouseOut JavaScript event."
+ * @netui:attribute required="false" rtexprvalue="true" description="The onMouseOut JavaScript for the HTML tr tag."
*/
public void setOnMouseOut(String onMouseOut) {
_trState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEOUT, onMouseOut);
}
/**
- * Sets the onMouseOver JavaScript event.
+ * Sets the onMouseOver JavaScript for the HTML tr tag.
*
* @param onMouseOver the onMouseOver event.
- * @jsptagref.attributedescription The onMouseOver JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onMouseOver JavaScript for the HTML tr tag.
* @jsptagref.attributesyntaxvalue <i>string_onMouseOver</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The onMouseOver JavaScript event."
+ * @netui:attribute required="false" rtexprvalue="true" description="The onMouseOver JavaScript for the HTML tr tag."
*/
public void setOnMouseOver(String onMouseOver) {
_trState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEOVER, onMouseOver);
}
/**
- * Sets the style of the rendered html tag.
+ * Sets the style attribute for the HTML tr tag.
*
- * @param style the html style.
- * @jsptagref.attributedescription The style.
- * @jsptagref.databindable false
+ * @param style the style
+ * @jsptagref.attributedescription The style attribute for the HTML tr tag.
* @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 for the HTML tr tag."
*/
public void setStyle(String style) {
if("".equals(style)) return;
@@ -195,13 +236,12 @@
}
/**
- * Sets the style class of the rendered html tag.
+ * Sets the style class for the HTML tr tag.
*
- * @param styleClass the html style class.
- * @jsptagref.attributedescription The style class.
- * @jsptagref.databindable false
+ * @param styleClass the style class.
+ * @jsptagref.attributedescription The style class for the HTML tr tag.
* @jsptagref.attributesyntaxvalue <i>string_style_class</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The style class."
+ * @netui:attribute required="false" rtexprvalue="true" description="The style class for the HTML tr tag."
*/
public void setStyleClass(String styleClass) {
if("".equals(styleClass)) return;
@@ -210,26 +250,24 @@
}
/**
- * Sets the value of the title attribute.
+ * Sets the title attribute for the HTML tr tag.
*
- * @param title
- * @jsptagref.attributedescription The title.
- * @jsptagref.databindable false
+ * @param title the title
+ * @jsptagref.attributedescription The title for the HTML tr tag.
* @jsptagref.attributesyntaxvalue <i>string_title</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The title. "
+ * @netui:attribute required="false" rtexprvalue="true" description="The title for the HTML tr tag."
*/
public void setTitle(String title) {
_trState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.TITLE, title);
}
/**
- * Sets the lang attribute for the HTML element.
- * @param lang
- * @jsptagref.attributedescription The lang.
- * @jsptagref.databindable false
+ * Sets the lang attribute for the HTML tr tag.
+ * @param lang the lang
+ * @jsptagref.attributedescription The lang for the HTML tr tag.
* @jsptagref.attributesyntaxvalue <i>string_lang</i>
* @netui:attribute required="false" rtexprvalue="true"
- * description="The lang."
+ * description="The lang for the HTML tr tag."
*/
public void setLang(String lang)
{
@@ -237,13 +275,12 @@
}
/**
- * Sets the lang attribute for the HTML element.
- * @param dir
- * @jsptagref.attributedescription The dir.
- * @jsptagref.databindable false
+ * Sets the lang attribute for the HTML element tr tag.
+ * @param dir the dir
+ * @jsptagref.attributedescription The dir for the HTML tr tag.
* @jsptagref.attributesyntaxvalue <i>string_dir</i>
* @netui:attribute required="false" rtexprvalue="true"
- * description="The dir."
+ * description="The dir for the HTML tr tag.
*/
public void setDir(String dir)
{
@@ -251,14 +288,13 @@
}
/**
- * Set the name of the tagId for the table row.
+ * Set the name of the tagId for the HTML tr tag.
*
* @param tagId the the name of the tagId for the table row.
- * @jsptagref.attributedescription The tagId.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The tagId for the HTML tr tat.
* @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. "
+ * description="String value. Sets the id (or name) attribute of the HTML tr tag."
*/
public void setTagId(String tagId)
throws JspException {
@@ -274,6 +310,31 @@
else applyTagId(_trState, tagId);
}
+ /**
+ * <p>
+ * Render this tag. This tag renders during the data grid's {@link DataGridTagModel#RENDER_STATE_HEADER},
+ * {@link DataGridTagModel#RENDER_STATE_GRID}, and the {@link DataGridTagModel#RENDER_STATE_FOOTER} render
+ * states. This tag will always render the an HTML table row tag and its body. The result is added
+ * to the output stream.
+ * </p>
+ * <p>
+ * Unless the {@link #setStyleClass(String)} attribute has been set and is non-null, the following style
+ * classes are used during the various supported rendering states:
+ * <table>
+ * <tr><td>Render State</td><td>Style Class</td></tr>
+ * <tr><td>{@link DataGridTagModel#RENDER_STATE_HEADER}</td>
+ * <td>{@link org.apache.beehive.netui.databinding.datagrid.api.rendering.StyleModel#getHeaderRowClass()}</td></tr>
+ * <tr><td>{@link DataGridTagModel#RENDER_STATE_GRID}</td>
+ * <td>{@link org.apache.beehive.netui.databinding.datagrid.api.rendering.StyleModel#getRowClass()} for
+ * an even row {@link org.apache.beehive.netui.databinding.datagrid.api.rendering.StyleModel#getAltRowClass()}
+ * for odd rows.</td></tr>
+ * <tr><td>{@link DataGridTagModel#RENDER_STATE_FOOTER}</td>
+ * <td>{@link org.apache.beehive.netui.databinding.datagrid.api.rendering.StyleModel#getFooterRowClass()}</td></tr>
+ * </table>
+ * </p>
+ * @throws JspException when the {@link DataGridTagModel} can not be found in the {@link JspContext}
+ * @throws IOException
+ */
public void doTag()
throws JspException, IOException {
@@ -301,17 +362,19 @@
InternalStringBuilder content = new InternalStringBuilder();
AbstractRenderAppender appender = new StringBuilderRenderAppender(content);
- if(renderState == DataGridTagModel.RENDER_STATE_GRID) {
- int index = dataGridModel.getCurrentIndex();
- if(index % 2 == 0)
- _trState.styleClass = styleModel.getRowClass();
- else _trState.styleClass = styleModel.getAltRowClass();
+ if(_trState.styleClass == null) {
+ if(renderState == DataGridTagModel.RENDER_STATE_GRID) {
+ int index = dataGridModel.getCurrentIndex();
+ if(index % 2 == 0)
+ _trState.styleClass = styleModel.getRowClass();
+ else _trState.styleClass = styleModel.getAltRowClass();
+ }
+ else if(renderState == DataGridTagModel.RENDER_STATE_HEADER)
+ _trState.styleClass = styleModel.getHeaderRowClass();
+ else if(renderState == DataGridTagModel.RENDER_STATE_FOOTER)
+ _trState.styleClass = styleModel.getFooterRowClass();
+ else assert false : "Attempting to apply style information during an invalid render state";
}
- else if(renderState == DataGridTagModel.RENDER_STATE_HEADER)
- _trState.styleClass = styleModel.getHeaderRowClass();
- else if(renderState == DataGridTagModel.RENDER_STATE_FOOTER)
- _trState.styleClass = styleModel.getFooterRowClass();
- else assert false : "Attempting to apply style information during an invalid render state";
String trScript = null;
if(_trState.id != null)
Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/TemplateCell.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/TemplateCell.java?rev=170300&r1=170299&r2=170300&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/TemplateCell.java (original)
+++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/TemplateCell.java Sun May 15 21:20:54 2005
@@ -50,8 +50,36 @@
* The HTML events, core attributes, and internationalization JSP tag attributes are applied to the
* <td>.
* </p>
- * *
+ *
* @jsptagref.tagdescription
+ * <p>
+ * Data grid cell that renders the content contained inside of its body inside of an HTML <td>
+ * tag. The body of the template cell can contain any JSP markup that is legal to nest inside of
+ * a {@link javax.servlet.jsp.tagext.SimpleTag}.
+ * </p>
+ * <p>
+ * The templateCell can be used to render HTML UI that is not supported with other data grid cell types. For example,
+ * to build UI that will POST data to a form, the NetUI {@link org.apache.beehive.netui.tags.html.TextBox} tag can
+ * be used as:
+ * <pre>
+ * <netui-data:templateCell>
+ * <netui:textBox dataSource="container.item.name"/>
+ * </netui-data:templateCell>
+ * </pre>
+ * </p>
+ * <p>
+ * The set of JSP implicit objects available to the body include:
+ * <ul>
+ * <li><code>dataGridModel</code> -- the {@link org.apache.beehive.netui.databinding.datagrid.api.rendering.DataGridTagModel}
+ * for the cell's containing data grid.</li>
+ * <li><code>container</code> -- the {@link org.apache.beehive.netui.script.common.IDataAccessProvider} instance
+ * that exposes the current data item and the current item's index</li>
+ * </ul>
+ * </p>
+ * <p>
+ * The HTML events, core attributes, and internationalization JSP tag attributes are applied to the
+ * <td>.
+ * </p>
*
* @netui:tag name="templateCell" description="Data grid cell that renders the content resulting from evaluating its body"
* body-content="scriptless"