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 [1/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
Author: ekoneil
Date: Sun May 15 21:20:54 2005
New Revision: 170300
URL: http://svn.apache.org/viewcvs?rev=170300&view=rev
Log:
NetUI 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/AbstractDataGridHtmlTag.java
incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractHtmlTableCell.java
incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AnchorCell.java
incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Caption.java
incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/DataGrid.java
incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/GetDataGridState.java
incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/HeaderCell.java
incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/ImageAnchorCell.java
incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Row.java
incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/TemplateCell.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=170300&r1=170299&r2=170300&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 21:20:54 2005
@@ -42,7 +42,7 @@
* <li>applying attributes</li>
* <li>applying state attributes to {@link AbstractHtmlState} instances used by subclasses.
* </ul>
- * </li>
+ * </p>
*/
public abstract class AbstractCell
extends AbstractDataGridHtmlTag {
@@ -95,7 +95,6 @@
throws JspException, IOException {
DataGridTagModel dataGridModel = DataGridUtil.getDataGridTagModel(getJspContext());
- assert dataGridModel != null;
int gridRenderState = dataGridModel.getRenderState();
Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractDataGridHtmlTag.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractDataGridHtmlTag.java?rev=170300&r1=170299&r2=170300&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractDataGridHtmlTag.java (original)
+++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractDataGridHtmlTag.java Sun May 15 21:20:54 2005
@@ -29,20 +29,52 @@
import org.apache.beehive.netui.databinding.datagrid.api.rendering.DataGridTagModel;
/**
- *
+ * <p>
+ * 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 {@link 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 {@link SpanCell} renders an HTML
+ * <span> tag; with its <code>tagId</code> 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.
+ * </p>
*/
public abstract class AbstractDataGridHtmlTag
extends AbstractSimpleTag {
+ /**
+ * Get the {@link DataGridTagModel} for the data grid.
+ * @return the data grid tag model
+ */
protected final DataGridTagModel lookupDataGridTagModel() {
return DataGridUtil.getDataGridTagModel(getJspContext());
}
+ /**
+ * Create an indexed tag identifier given a state object and a base tag identifier. The <code>tagId</code>
+ * will have the index of the current item in the data grid attached as a suffix to the
+ * the given base identifier.
+ * @param state the {@link AbstractHtmlState} upon which the tag identifier will be set once created
+ * @param tagId the base tag identifier name
+ * @throws JspException
+ */
protected final void applyIndexedTagId(AbstractHtmlState state, String tagId)
throws JspException {
state.id = indexTagId(generateTagId(tagId));
}
+ /**
+ * Create an un-indexed tag identifier for the given state object.
+ * @param state the {@link AbstractHtmlState} upon which the tag identifier will be set once created
+ * @param tagId the base tag identifier
+ * @throws JspException
+ */
protected final void applyTagId(AbstractHtmlState state, String tagId)
throws JspException {
state.id = generateTagId(tagId);
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=170300&r1=170299&r2=170300&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 21:20:54 2005
@@ -59,9 +59,14 @@
private TdTag.State _cellState = new TdTag.State();
/**
- * Set the sort expression associated with this header cell.
+ * <p>
+ * Set the sort expression with which this cell should be associated. Cells use this value
+ * to lookup any {@link org.apache.beehive.netui.databinding.datagrid.api.sort.Sort} state
+ * that may apply to this cell. Often, this value matches a {@link HeaderCell#setSortExpression(String)}
+ * set on a header cell. It is used by data cells to render styles representing sorted data.
+ * </p>
* @param sortExpression the sort expression
- * @jsptagref.attributedescription the sort expression associated with this header cell.
+ * @jsptagref.attributedescription
* @jsptagref.attributesyntaxvalue <i>string</i>
* @netui:attribute required="false" rtexprvalue="true"
*/
@@ -70,9 +75,20 @@
}
/**
- * The filter expression associated with this header cell
+ * <p>
+ * Set the filter expression with which this cell should be associated. Cells use this value
+ * to lookup any {@link org.apache.beehive.netui.databinding.datagrid.api.filter.Filter} state
+ * that may apply to this cell. Often, this value matches a {@link HeaderCell#setFilterExpression(String)}
+ * set on a header cell. It is used by data cells to render styles representing filtered data.
+ * </p>
* @param filterExpression the filter expression
- * @jsptagref.attributedescription the filter expression associated with this header cell
+ * @jsptagref.attributedescription
+ * <p>
+ * Set the filter expression with which this cell should be associated. Cells use this value
+ * to lookup any {@link org.apache.beehive.netui.databinding.datagrid.api.filter.Filter} state
+ * that may apply to this cell. Often, this value matches a {@link HeaderCell#setFilterExpression(String)}
+ * set on a header cell. It is used by data cells to render styles representing filtered data.
+ * </p>
* @jsptagref.attributesyntaxvalue <i>string</i>
* @netui:attribute required="false" rtexprvalue="true"
*/
@@ -89,7 +105,7 @@
/**
- * 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 for the HTML table cell.
@@ -474,7 +490,8 @@
throws IOException, JspException {
DataGridTagModel dataGridModel = DataGridUtil.getDataGridTagModel(getJspContext());
- assert dataGridModel != null;
+ if(dataGridModel == null)
+ throw new JspException(Bundle.getErrorString("DataGridTags_MissingDataGridModel"));
TableRenderer tableRenderer = dataGridModel.getTableRenderer();
assert tableRenderer != null;
Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AnchorCell.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AnchorCell.java?rev=170300&r1=170299&r2=170300&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AnchorCell.java (original)
+++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AnchorCell.java Sun May 15 21:20:54 2005
@@ -560,7 +560,7 @@
* 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:anchorCell href="foo.jsp" value="Go To Foo>
+ * <netui-data:anchorCell href="foo.jsp" value="Go To Foo">
* <netui:parameter name="paramKey" value="paramValue"/>
* </netui-data:anchorCell>
* </pre>
Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Caption.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Caption.java?rev=170300&r1=170299&r2=170300&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Caption.java (original)
+++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Caption.java Sun May 15 21:20:54 2005
@@ -278,6 +278,15 @@
applyTagId(_captionTag, tagId);
}
+ /**
+ * <p>
+ * Render the caption tag. This tag renders during the data grid's {@link DataGridTagModel#RENDER_STATE_CAPTION}
+ * state and produces an HTML <caption> which contains the result of having evaluated
+ * the body of this tag.
+ * </p>
+ * @throws IOException
+ * @throws JspException when the {@link DataGridTagModel} can not be found in the {@link JspContext}
+ */
public void doTag()
throws IOException, JspException {
Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/DataGrid.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/DataGrid.java?rev=170300&r1=170299&r2=170300&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/DataGrid.java (original)
+++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/DataGrid.java Sun May 15 21:20:54 2005
@@ -53,8 +53,12 @@
import org.apache.beehive.netui.util.Bundle;
/**
- * @jsptagref.tagdescription Renders an HTML table containing a data set
- * @netui:tag name="dataGrid" description="Renders an HTML table containing a data set" body-content="scriptless"
+ * <p>
+ * </p>
+ * @jsptagref.tagdescription
+ *
+ * @netui:tag name="dataGrid"
+ * description="Renders an HTML table containing a data set" body-content="scriptless"
*/
public class DataGrid
extends AbstractDataGridHtmlTag
@@ -78,9 +82,9 @@
/**
* @jsptagref.attributedescription
- * @jsptagref.databindable
- * @jsptagref.attributesyntaxvalue <i></i>
+ * @jsptagref.attributesyntaxvalue <i>string_dataGridConfig</i>
* @netui:attribute required="false" rtexprvalue="true"
+ * description=""
*/
public void setDataGridConfig(DataGridConfig dataGridConfig) {
_dataGridConfig = dataGridConfig;
@@ -88,9 +92,9 @@
/**
* @jsptagref.attributedescription
- * @jsptagref.databindable
- * @jsptagref.attributesyntaxvalue <i></i>
+ * @jsptagref.attributesyntaxvalue <i>string_name</i>
* @netui:attribute required="true"
+ * description=""
*/
public void setName(String name) {
_name = name;
@@ -98,9 +102,9 @@
/**
* @jsptagref.attributedescription
- * @jsptagref.databindable
- * @jsptagref.attributesyntaxvalue <i></i>
+ * @jsptagref.attributesyntaxvalue <i>string_dataSource</i>
* @netui:attribute required="true"
+ * description=""
*/
public void setDataSource(String dataSource) {
_dataSource = dataSource;
@@ -108,9 +112,9 @@
/**
* @jsptagref.attributedescription
- * @jsptagref.databindable
- * @jsptagref.attributesyntaxvalue <i></i>
+ * @jsptagref.attributesyntaxvalue <i>string_styleClassPrefix</i>
* @netui:attribute required="false" rtexprvalue="true"
+ * description=""
*/
public void setStyleClassPrefix(String styleClassPrefix) {
_styleClassPrefix = styleClassPrefix;
@@ -118,9 +122,9 @@
/**
* @jsptagref.attributedescription
- * @jsptagref.databindable
- * @jsptagref.attributesyntaxvalue <i></i>
+ * @jsptagref.attributesyntaxvalue <i>string_resourceBundlePath</i>
* @netui:attribute required="false" rtexprvalue="true"
+ * description=""
*/
public void setResourceBundlePath(String resourceBundlePath) {
_resourceBundlePath = resourceBundlePath;
@@ -128,9 +132,9 @@
/**
* @jsptagref.attributedescription
- * @jsptagref.databindable
- * @jsptagref.attributesyntaxvalue <i></i>
+ * @jsptagref.attributesyntaxvalue <i>string_stylePolicy</i>
* @netui:attribute required="false" rtexprvalue="true"
+ * description=""
*/
public void setStyleClassPolicy(String stylePolicy) {
_stylePolicyName = stylePolicy;
@@ -138,152 +142,142 @@
/**
* @jsptagref.attributedescription
- * @jsptagref.databindable
- * @jsptagref.attributesyntaxvalue <i></i>
+ * @jsptagref.attributesyntaxvalue <i>boolean_renderRowGroups</i>
* @netui:attribute required="false" rtexprvalue="true"
+ * description=""
*/
public void setRenderRowGroups(boolean renderRowGroups) {
_renderRowGroups = renderRowGroups;
}
/**
- * Sets the onClick JavaScript event.
+ * Sets the onClick JavaScript event for the HTML tag.
*
* @param onClick the onClick event.
- * @jsptagref.attributedescription The onClick JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onClick JavaScript event for the HTML 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 event for the HTML tag."
*/
public void setOnClick(String onClick) {
_tableState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONCLICK, onClick);
}
/**
- * Sets the onDblClick JavaScript event.
+ * Sets the onDblClick JavaScript event for the HTML tag.
*
* @param onDblClick the onDblClick event.
- * @jsptagref.attributedescription The onDblClick JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onDblClick JavaScript event for the HTML 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 event for the HTML tag."
*/
public void setOnDblClick(String onDblClick) {
_tableState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONDBLCLICK, onDblClick);
}
/**
- * Sets the onKeyDown JavaScript event.
+ * Sets the onKeyDown JavaScript event for the HTML tag.
*
* @param onKeyDown the onKeyDown event.
- * @jsptagref.attributedescription The onKeyDown JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onKeyDown JavaScript event for the HTML 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 event for the HTML tag."
*/
public void setOnKeyDown(String onKeyDown) {
_tableState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONKEYDOWN, onKeyDown);
}
/**
- * Sets the onKeyUp JavaScript event.
+ * Sets the onKeyUp JavaScript event for the HTML tag.
*
* @param onKeyUp the onKeyUp event.
- * @jsptagref.attributedescription The onKeyUp JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onKeyUp JavaScript event for the HTML 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 event for the HTML tag."
*/
public void setOnKeyUp(String onKeyUp) {
_tableState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONKEYUP, onKeyUp);
}
/**
- * Sets the onKeyPress JavaScript event.
+ * Sets the onKeyPress JavaScript event for the HTML tag.
*
* @param onKeyPress the onKeyPress event.
- * @jsptagref.attributedescription The onKeyPress JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onKeyPress JavaScript event for the HTML 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 event for the HTML tag."
*/
public void setOnKeyPress(String onKeyPress) {
_tableState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONKEYPRESS, onKeyPress);
}
/**
- * Sets the onMouseDown JavaScript event.
+ * Sets the onMouseDown JavaScript event for the HTML tag.
*
* @param onMouseDown the onMouseDown event.
- * @jsptagref.attributedescription The onMouseDown JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onMouseDown JavaScript event for the HTML 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 event for the HTML tag."
*/
public void setOnMouseDown(String onMouseDown) {
_tableState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEDOWN, onMouseDown);
}
/**
- * Sets the onMouseUp JavaScript event.
+ * Sets the onMouseUp JavaScript event for the HTML tag.
*
* @param onMouseUp the onMouseUp event.
- * @jsptagref.attributedescription The onMouseUp JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onMouseUp JavaScript event for the HTML 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 event for the HTML tag."
*/
public void setOnMouseUp(String onMouseUp) {
_tableState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEUP, onMouseUp);
}
/**
- * Sets the onMouseMove JavaScript event.
+ * Sets the onMouseMove JavaScript event for the HTML tag.
*
* @param onMouseMove the onMouseMove event.
- * @jsptagref.attributedescription The onMouseMove JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onMouseMove JavaScript event for the HTML 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 event for the HTML tag."
*/
public void setOnMouseMove(String onMouseMove) {
_tableState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEMOVE, onMouseMove);
}
/**
- * Sets the onMouseOut JavaScript event.
+ * Sets the onMouseOut JavaScript event for the HTML tag.
*
* @param onMouseOut the onMouseOut event.
- * @jsptagref.attributedescription The onMouseOut JavaScript event.
+ * @jsptagref.attributedescription The onMouseOut JavaScript event for the HTML tag.
* @jsptagref.databindable false
* @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 event for the HTML tag."
*/
public void setOnMouseOut(String onMouseOut) {
_tableState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEOUT, onMouseOut);
}
/**
- * Sets the onMouseOver JavaScript event.
+ * Sets the onMouseOver JavaScript event for the HTML tag.
*
* @param onMouseOver the onMouseOver event.
- * @jsptagref.attributedescription The onMouseOver JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onMouseOver JavaScript event for the HTML table 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 event for the HTML tag."
*/
public void setOnMouseOver(String onMouseOver) {
_tableState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEOVER, onMouseOver);
}
/**
- * Sets the style of the rendered html tag.
+ * Sets the style for the HTML table tag.
*
* @param style the html style.
- * @jsptagref.attributedescription The style.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The style for the HTML table 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 for the HTML table tag"
*/
public void setStyle(String style) {
if("".equals(style)) return;
@@ -292,13 +286,12 @@
}
/**
- * Sets the style class of the rendered html tag.
+ * Sets the style class for the HTML table tag.
*
* @param styleClass the html style class.
- * @jsptagref.attributedescription The style class.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The style class for the HTML table 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 table tag."
*/
public void setStyleClass(String styleClass) {
if("".equals(styleClass)) return;
@@ -307,25 +300,23 @@
}
/**
- * Sets the value of the title attribute.
+ * Sets the value of the title attribute for the HTML table tag.
*
- * @param title
- * @jsptagref.attributedescription The title.
- * @jsptagref.databindable false
+ * @param title the title
+ * @jsptagref.attributedescription The title for the HTML table 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 table tag."
*/
public void setTitle(String title) {
_tableState.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 table tag.
+ * @param lang the lang
+ * @jsptagref.attributedescription The lang for the HTML table tag.
* @jsptagref.attributesyntaxvalue <i>string_lang</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The lang."
+ * @netui:attribute required="false" rtexprvalue="true" description="The lang for the HTML table tag."
*/
public void setLang(String lang)
{
@@ -333,13 +324,12 @@
}
/**
- * Sets the lang attribute for the HTML element.
- * @param dir
- * @jsptagref.attributedescription The dir.
- * @jsptagref.databindable false
+ * Sets the dir attribute for the HTML table tag.
+ * @param dir the dir
+ * @jsptagref.attributedescription The dir for the HTML table tag.
* @jsptagref.attributesyntaxvalue <i>string_dir</i>
* @netui:attribute required="false" rtexprvalue="true"
- * description="The dir."
+ * description="The dir for the HTML table tag."
*/
public void setDir(String dir)
{
@@ -347,12 +337,12 @@
}
/**
- * Sets the summary attribute for the generated HTML table.
- * @param summary
- * @jsptagref.attributedescription The summary.
- * @jsptagref.databindable false
+ * Sets the summary attribute for the HTML table tag.
+ * @param summary the summary
+ * @jsptagref.attributedescription The summary for the HTML table tag.
* @jsptagref.attributesyntaxvalue <i>string_summary</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The summary."
+ * @netui:attribute required="false" rtexprvalue="true"
+ * description="The summary for the HTML table tag."
*/
public void setSummary(String summary)
{
@@ -360,12 +350,11 @@
}
/**
- * Sets the width attribute for the generated HTML table.
- * @param width
- * @jsptagref.attributedescription The width.
- * @jsptagref.databindable false
+ * Sets the width attribute for the HTML table tag.
+ * @param width the width
+ * @jsptagref.attributedescription The width for the HTML table tag.
* @jsptagref.attributesyntaxvalue <i>string_width</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The width."
+ * @netui:attribute required="false" rtexprvalue="true" description="The width attribute for the HTML table tag."
*/
public void setWidth(String width)
{
@@ -373,12 +362,11 @@
}
/**
- * Sets the border attribute for the generated HTML table.
+ * Sets the border attribute for the HTML table tag.
* @param border
- * @jsptagref.attributedescription The border.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The border attribute for the HTML table tag.
* @jsptagref.attributesyntaxvalue <i>string_dir</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The border."
+ * @netui:attribute required="false" rtexprvalue="true" description="The border attribute for the HTML table tag."
*/
public void setBorder(String border)
{
@@ -386,13 +374,12 @@
}
/**
- * Sets the frame attribute for the generated HTML table.
- * @param frame
- * @jsptagref.attributedescription The frame.
- * @jsptagref.databindable false
+ * Sets the frame attribute for the HTML table tag.
+ * @param frame the frame
+ * @jsptagref.attributedescription The frame attribute for the HTML table tag.
* @jsptagref.attributesyntaxvalue <i>string_frame</i>
* @netui:attribute required="false" rtexprvalue="true"
- * description="The frame."
+ * description="The frame for the HTML table tag."
*/
public void setFrame(String frame)
{
@@ -400,12 +387,11 @@
}
/**
- * Sets the lang attribute for the HTML element.
- * @param rules
- * @jsptagref.attributedescription The rules.
- * @jsptagref.databindable false
+ * Sets the rules attribute for the HTML table tag.
+ * @param rules the rules
+ * @jsptagref.attributedescription The rules attribute for the HTML table tag.
* @jsptagref.attributesyntaxvalue <i>string_rules</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The rules."
+ * @netui:attribute required="false" rtexprvalue="true" description="The rules attribute for the HTML table tag."
*/
public void setRules(String rules)
{
@@ -413,12 +399,11 @@
}
/**
- * Sets the lang attribute for the HTML element.
- * @param cellspacing
- * @jsptagref.attributedescription The cellspacing.
- * @jsptagref.databindable false
+ * Sets the cellspacing attribute for the HTML table tag.
+ * @param cellspacing the cell spacing
+ * @jsptagref.attributedescription The cellspacing for the HTML table tag.
* @jsptagref.attributesyntaxvalue <i>string_cellspacing</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The cellspacing."
+ * @netui:attribute required="false" rtexprvalue="true" description="The cellspacing for the HTML table tag."
*/
public void setCellspacing(String cellspacing)
{
@@ -426,12 +411,11 @@
}
/**
- * Sets the lang attribute for the HTML element.
- * @param cellpadding
- * @jsptagref.attributedescription The cellpadding.
- * @jsptagref.databindable false
+ * Sets the cellpadding attribute for the HTML table tag.
+ * @param cellpadding the cell padding
+ * @jsptagref.attributedescription The cellpadding for the HTML table tag.
* @jsptagref.attributesyntaxvalue <i>string_cellpadding</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The cellpadding."
+ * @netui:attribute required="false" rtexprvalue="true" description="The cellpadding for the HTML table tag."
*/
public void setCellpadding(String cellpadding)
{
@@ -439,11 +423,10 @@
}
/**
- * Set the name of the tagId for the table tag.
+ * Set the name of the tagId for the HTML table tag.
*
* @param tagId the the name of the tagId for the table tag.
- * @jsptagref.attributedescription The tagId.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The tagId for the HTML table tag.
* @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. "
@@ -454,11 +437,23 @@
}
/**
- * @param name
- * @param value
- * @param facet
- * @throws JspException
- */
+ * <p>
+ * Implementation of the {@link IBehaviorConsumer} interface that extends the functionality of this
+ * tag beyond that exposed via the JSP tag attributes. This method accepts the following facets:
+ * <table>
+ * <tr><td>Facet Name</td><td>Operation</td></tr>
+ * <tr><td><code>resource</code></td><td>Adds or overrides a data grid resource key with a new value.</td></tr>
+ * </table>
+ * A new resource key is added in order to override a value defined in
+ * {@link org.apache.beehive.netui.databinding.datagrid.api.rendering.IDataGridMessageKeys}. When a message
+ * is overridden or added here, the page author is able to override a single string resource such as a
+ * pager mesage or sort href.
+ * </p>
+ * @param name the name of the behavior
+ * @param value the value of the behavior
+ * @param facet th ebehavior's facet
+ * @throws JspException when the behavior's facet isnot recognized
+ */
public void setBehavior(String name, Object value, String facet)
throws JspException {
if(facet != null && facet.equals(FACET_RESOURCE)) {
@@ -470,6 +465,14 @@
}
}
+ /**
+ * <p>
+ * Render a data grid. This method implements the logic used to iterate through the data grid's rendering states
+ * defined in {@link DataGridTagModel}.
+ * </p>
+ * @throws JspException when an error occurs evaluating the tag's body
+ * @throws IOException when an error occurs writing to the output strema
+ */
public void doTag()
throws JspException, IOException {
@@ -621,25 +624,55 @@
*
* ===========================================================
*/
+
+ /**
+ * Get the index of the current item in the data set. This is a zero-based absolute
+ * index into the entire data set being rendered by the data grid. This value
+ * should only be data bound inside of the {@link Rows}.
+ * @return the index of the current item
+ */
public int getCurrentIndex() {
return _dataGridTagModel.getCurrentIndex();
}
+ /**
+ * Get the current item in the data set. As the data grid iterates over the data set, this
+ * value will change to provide access to the current item in the data set. This value
+ * should only be data bound inside of the {@link Rows}.
+ * @return the current item
+ */
public Object getCurrentItem() {
return _dataGridTagModel.getCurrentItem();
}
+ /**
+ * Get metadata for the current item. This operation is unsupported on the data grid.
+ * @return the metadata for the current item
+ * @throws UnsupportedOperationException as this method is unsupported
+ */
public Object getCurrentMetadata() {
throw new UnsupportedOperationException(Bundle.getErrorString("Tags_DataAccessProvider_metadataUnsupported",
new Object[]{getTagName()}));
}
+ /**
+ * Get the data source for the data grid. This value returns a NetUI EL expression which can
+ * be evaluated by the NetUI tag API.
+ * @return the expression
+ */
public String getDataSource() {
return "{" + _dataSource + "}";
}
- /* todo: support nested data grids. this should be done via the stack of objects in the PageContext */
+ /**
+ * Get the parent data access provider. This method requires access to the tag hierarchy and is not
+ * usable across tag file or JSP include rendering boundaries. The result of this method is used for
+ * evaluating expressions of the form <code>${container.container}</code> where this tag's parent
+ * repeating tag is referenced.
+ * @return the parent data access provider
+ */
public IDataAccessProvider getProviderParent() {
+ /* todo: support nested data grids. this should be done via the stack of objects in the PageContext */
return (IDataAccessProvider)SimpleTagSupport.findAncestorWithClass(this, IDataAccessProvider.class);
}
}
Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/GetDataGridState.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/GetDataGridState.java?rev=170300&r1=170299&r2=170300&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/GetDataGridState.java (original)
+++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/GetDataGridState.java Sun May 15 21:20:54 2005
@@ -25,6 +25,40 @@
import org.apache.beehive.netui.databinding.datagrid.api.DataGridState;
/**
+ * <p>
+ * Utility data grid tag that allows the page author to gain access to the {@link DataGridState} object
+ * outside of the body of a <netui-data:dataGrid> tag. When building UI for sorting, filtering, or paging,
+ * this UI does not need to exist inside of the HTML table rendered by the data grid tags. In order to render
+ * UI for sorting, filtering, and paging, it is often necessary to gain access to the state exposed to a data
+ * grid via the {@link DataGridState} object. For example:
+ * <pre>
+ * <netui-data:getDataGridState gridName="employees" var="employeeGridState"/>
+ * <c:if test="${pageScope.employeeGridState.sortModel.sorts} != null}">
+ * ... render UI when sorts are present ...
+ * </c:if>
+ * </pre>
+ * this will expose the "employees" data grid's list of
+ * {@link org.apache.beehive.netui.databinding.datagrid.api.sort.SortModel#getSorts()} to the JSP for access by
+ * the JSP EL.
+ * </p>
+ * @jsptagref.tagdescription
+ * <p>
+ * Utility data grid tag that allows the page author to gain access to the {@link DataGridState} object
+ * outside of the body of a <netui-data:dataGrid> tag. When building UI for sorting, filtering, or paging,
+ * this UI does not need to exist inside of the HTML table rendered by the data grid tags. In order to render
+ * UI for sorting, filtering, and paging, it is often necessary to gain access to the state exposed to a data
+ * grid via the {@link DataGridState} object. For example:
+ * <pre>
+ * <netui-data:getDataGridState gridName="employees" var="employeeGridState"/>
+ * <c:if test="${pageScope.employeeGridState.sortModel.sorts} != null}">
+ * ... render UI when sorts are present ...
+ * </c:if>
+ * </pre>
+ * this will expose the "employees" data grid's list of
+ * {@link org.apache.beehive.netui.databinding.datagrid.api.sort.SortModel#getSorts()} to the JSP for access by
+ * the JSP EL.
+ * </p>
+ *
* @netui:tag name="getDataGridState" body-content="scriptless"
* description="Get a DataGridState object and add it to the PageContext under a given variable name"
*/
@@ -40,31 +74,54 @@
}
/**
- * @netui:attribute name="name"
- * \
+ * Set the data grid name whose {@link DataGridState} should be placed in the {@link JspContext}.
+ *
+ * @param name the name of the data grid
+ * @jsptagref.attributedescription
+ * Set the data grid name whose {@link DataGridState} should be placed in the {@link JspContext}.
+ * @jsptagref.attributesyntaxvalue <i>string_gridName</i>
+ * @netui:attribute name="name" required="true"
+ * description="Set the name of the data grid whose DataGridState to lookup."
*/
public void setGridName(String name) {
_name = name;
}
/**
- * @netui:attribute name="var"
+ * Set the name used to store the {@link DataGridState} object as a {@link JspContext} attribute.
+ * @param var the name used to store the {@link DataGridState}
+ * @jsptagref.attributedescription
+ * Set the name used to store the {@link DataGridState} object as a {@link JspContext} attribute.
+ * @jsptagref.attributesyntaxvalue <i>string_var</i>
+ * @netui:attribute name="var" required="true"
*/
public void setVar(String var) {
_var = var;
}
/**
- * @netui:attribute name="name"
- * \
+ * Set a {@link DataGridConfig} instance used to create a {@link DataGridState} object. This attribute is
+ * optional; when unset, the default {@link DataGridConfig} is used.
+ * @param config the {@link DataGridConfig} used to create the {@link DataGridState}
+ * @jsptagref.attributedescription
+ * Set a {@link DataGridConfig} instance used to create a {@link DataGridState} object. This attribute is
+ * optional; when unset, the default {@link DataGridConfig} is used.
+ * @jsptagref.attributesyntaxvalue <i>string_var</i>
+ * @netui:attribute name="name" required="false"
+ * description="Set an optional DataGridConfig instance used to create the DataGridState object."
*/
public void setDataGridConfig(DataGridConfig config) {
_config = config;
}
+ /**
+ * Using a {@link DataGridConfig} object, access the {@link DataGridState} and place
+ * it in the {@link JspContext} under the attribute key set via {@link #setVar(String)}
+ */
public void doTag() {
JspContext jspContext = getJspContext();
DataGridStateFactory factory = DataGridStateFactory.getInstance(jspContext);
+ assert factory != null;
DataGridState state = null;
if(_config != null)
Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/HeaderCell.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/HeaderCell.java?rev=170300&r1=170299&r2=170300&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/HeaderCell.java (original)
+++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/HeaderCell.java Sun May 15 21:20:54 2005
@@ -45,16 +45,90 @@
import org.apache.beehive.netui.util.Bundle;
/**
- *
+ * <p>
+ * This tag is used to render an HTML table header cell and should generally be used inside of the data grid's
+ * {@link Header} tag. Cells rendered with this tag usually appear at the top of a column of data displayed
+ * in a grid. Content for the body of a table header cell can be specified in one of two ways:
+ * <ul>
+ * <li>from the {@link #setHeaderText(String)} attribute</li>
+ * <li>from the tag's body</li>
+ * </ul>
+ * This tag can accept in its body any content which is allowable inside of a JSP {@link javax.servlet.jsp.tagext.SimpleTag}.
+ * If the header text attribute is provided, it will supercede the content rendered by the body, though the body
+ * will still be evaluated.
+ * </p>
+ * <p>
+ * The header cell is also able to display UI for showing and changing the sort and filter state of a data grid.
+ * By default, this tag renders a clickable arrow indicating the sort state and allow ing a page user to change
+ * the sort state. The state of a sort is usually associated with the data displayed in a column though the
+ * data in the column and the expression used to sort the data are loosely coupled via a 'sort expression'. The
+ * sort expression text is used to lookup the {@link org.apache.beehive.netui.databinding.datagrid.api.sort.Sort} state
+ * from the {@link org.apache.beehive.netui.databinding.datagrid.api.DataGridState} associated with the containing
+ * data grid. If sorts are found, this tag will render the appropriate UI for the sort. Only a single sort
+ * may be associated with the sort expression. The clickable link rendered for changing the sort state is built
+ * using either the {@link #setSortHref(String)} or the {@link #setSortAction(String)} attributes. Sort UI rendering
+ * can be disabled using the {@link #setDisableSortRendering(boolean)} attribute. Custom UI can be rendered
+ * for changing or displaying the sort state by providing a body for this tag and using the JSP EL data bindable
+ * {@link org.apache.beehive.netui.databinding.datagrid.api.DataGridState} object available via the data
+ * grid's <code>dataGrid</code> implicit object.
+ * </p>
+ * <p>
+ * The header cell provides attributes for supporting authoring of filter UI, but this tag does not by default
+ * implement a filter UI. The attributes are provided here so that their values can be data bound when building
+ * custom filter UI.
+ * </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}
+ * <li><code>dataGrid</code> -- the {@link org.apache.beehive.netui.databinding.datagrid.api.rendering.DataGridTagModel}
* for the cell's containing data grid.</li>
+ * <li><code>cellModel</code> -- the {@link org.apache.beehive.netui.databinding.datagrid.api.rendering.CellModel}
+ * containing state for the attributes of this tag.</li>
* </ul>
* </p>
*
* @jsptagref.tagdescription
+ * <p>
+ * This tag is used to render an HTML table header cell and should generally be used inside of the data grid's
+ * {@link Header} tag. Cells rendered with this tag usually appear at the top of a column of data displayed
+ * in a grid. Content for the body of a table header cell can be specified in one of two ways:
+ * <ul>
+ * <li>from the {@link #setHeaderText(String)} attribute</li>
+ * <li>from the tag's body</li>
+ * </ul>
+ * This tag can accept in its body any content which is allowable inside of a JSP {@link javax.servlet.jsp.tagext.SimpleTag}.
+ * If the header text attribute is provided, it will supercede the content rendered by the body, though the body
+ * will still be evaluated.
+ * </p>
+ * <p>
+ * The header cell is also able to display UI for showing and changing the sort and filter state of a data grid.
+ * By default, this tag renders a clickable arrow indicating the sort state and allow ing a page user to change
+ * the sort state. The state of a sort is usually associated with the data displayed in a column though the
+ * data in the column and the expression used to sort the data are loosely coupled via a 'sort expression'. The
+ * sort expression text is used to lookup the {@link org.apache.beehive.netui.databinding.datagrid.api.sort.Sort} state
+ * from the {@link org.apache.beehive.netui.databinding.datagrid.api.DataGridState} associated with the containing
+ * data grid. If sorts are found, this tag will render the appropriate UI for the sort. Only a single sort
+ * may be associated with the sort expression. The clickable link rendered for changing the sort state is built
+ * using either the {@link #setSortHref(String)} or the {@link #setSortAction(String)} attributes. Sort UI rendering
+ * can be disabled using the {@link #setDisableSortRendering(boolean)} attribute. Custom UI can be rendered
+ * for changing or displaying the sort state by providing a body for this tag and using the JSP EL data bindable
+ * {@link org.apache.beehive.netui.databinding.datagrid.api.DataGridState} object available via the data
+ * grid's <code>dataGrid</code> implicit object.
+ * </p>
+ * <p>
+ * The header cell provides attributes for supporting authoring of filter UI, but this tag does not by default
+ * implement a filter UI. The attributes are provided here so that their values can be data bound when building
+ * custom filter UI.
+ * </p>
+ * <p>
+ * The set of JSP implicit objects available to the body include:
+ * <ul>
+ * <li><code>dataGrid</code> -- the {@link org.apache.beehive.netui.databinding.datagrid.api.rendering.DataGridTagModel}
+ * for the cell's containing data grid.</li>
+ * <li><code>cellModel</code> -- the {@link org.apache.beehive.netui.databinding.datagrid.api.rendering.CellModel}
+ * containing state for the attributes of this tag.</li>
+ * </ul>
+ * </p>
* @netui:tag name="headerCell" body-content="scriptless"
* description="Render an HTML table head cell inside of a data grid"
*/
@@ -87,10 +161,16 @@
}
/**
- * Sets the text to render for this table header cell.
+ * Sets the text to render for this table header cell. This text will be rendered inside of the
+ * <th> tags.
*
* @param headerText The text to render.
+ * @jsptagref.attributedescription
+ * Sets the text to render for this table header cell. This text will be rendered inside of the
+ * <th> tags.
+ * @jsptagref.attributesyntaxvalue <i>string_headerText</i>
* @netui:attribute required="false" rtexprvalue="true"
+ * description="The text to render inside of the HTML th tag."
*/
public void setHeaderText(String headerText) {
_headerText = headerText;
@@ -99,63 +179,155 @@
/**
* Sets the scopeId for any anchors rendered by this header cell.
*
- * @netui:attribute required="false" rtexprvalue="true" description="Optional String scopeId that qualifies URL parameters into a particular scope"
+ * @param scopeId
+ * @jsptagref.attributedescription
+ * Sets the scopeId for any anchors rendered by this header cell.
+ * @jsptagref.attributesyntaxvalue <i>string_scopeId</i>
+ * @netui:attribute required="false" rtexprvalue="true"
+ * description="Optional String scopeId that qualifies URL parameters into a particular scope"
*/
public void setScopeId(String scopeId) {
_headerCellModel.setScopeId(scopeId);
}
/**
- * @netui:attribute required="false" rtexprvalue="true" description="Boolean switch that sets whether the default sort link should be rendered"
+ * Set a boolean which can be used to enable / disable rendering of UI associated with filtering inside
+ * of the data grid.
+ * @param disableFilterRendering boolean to enable / disable filter UI rendering
+ * @jsptagref.attributedescription
+ * Set a boolean which can be used to enable / disable rendering of UI associated with filtering inside
+ * of the data grid.
+ * @jsptagref.attributesyntaxvalue <i>string_disableFilterRendering</i>
+ * @netui:attribute required="false" rtexprvalue="true"
+ * description="Boolean to enable / disable filter UI rendering"
*/
public void setDisableFilterRendering(boolean disableFilterRendering) {
_headerCellModel.setDisableFilterRendering(disableFilterRendering);
}
/**
- * @netui:attribute required="false" rtexprvalue="true" description="String expression that represents the field to sort when sorting data in this column"
+ * Set the filter expression for this header cell. The value of this attribute is used to lookup
+ * {@link org.apache.beehive.netui.databinding.datagrid.api.filter.Filter} state for a data grid
+ * If filters are found matching this filter expression, the column is said to be 'filtered'. When
+ * a column is filtered, it is possible for the header cell UI to change to allow changing or
+ * removing the filter. By default, no UI is rendered for filtered columns. To have data cells
+ * rendered with filter information, this filter expression value should be set on the
+ * {@link AbstractHtmlTableCell#setFilterExpression(String)} attribute for cell tags rendered
+ * inside of the {@link Rows} tag.
+ *
+ * @param filterExpression the filter expression
+ * @jsptagref.attributedescription
+ * Set the filter expression for this header cell. The value of this attribute is used to lookup
+ * {@link org.apache.beehive.netui.databinding.datagrid.api.filter.Filter} state for a data grid
+ * If filters are found matching this filter expression, the column is said to be 'filtered'. When
+ * a column is filtered, it is possible for the header cell UI to change to allow changing or
+ * removing the filter. By default, no UI is rendered for filtered columns. To have data cells
+ * rendered with filter information, this filter expression value should be set on the
+ * {@link AbstractHtmlTableCell#setFilterExpression(String)} attribute for cell tags rendered
+ * inside of the {@link Rows} tag.
+ * @jsptagref.attributesyntaxvalue <i>string_filterExpression</i>
+ * @netui:attribute required="false" rtexprvalue="true"
+ * description="String filter expression that is used to lookup a data grid's Filter state"
*/
public void setFilterExpression(String filterExpression) {
_headerCellModel.setFilterExpression(filterExpression);
}
/**
- * @netui:attribute required="false" rtexprvalue="true" description="The action to run when performing a filter on this column"
+ * Set the name of an action used to perform filtering on a data grid. This action must exist in the context
+ * of the current Page Flow. It is used to build anchor URIs that when clicked change or display UI that allows
+ * for change to the cell's filter state. Only one of this and the {@link #setFilterHref(String)} may be
+ * set on this tag.
+ * @param filterAction the filter action
+ * @jsptagref.attributedescription
+ * Set the name of an action used to perform filtering on a data grid. This action must exist in the context
+ * of the current Page Flow. It is used to build anchor URIs that when clicked change or display UI that allows
+ * for change to the cell's filter state. Only one of this and the {@link #setFilterHref(String)} may be
+ * set on this tag.
+ * @jsptagref.attributesyntaxvalue <i>string_filterAction</i>
+ * @netui:attribute required="false" rtexprvalue="true"
+ * description="The action used to build URIs used to change the filter state of this cell"
*/
public void setFilterAction(String filterAction) {
_headerCellModel.setFilterAction(filterAction);
}
/**
- * @netui:attribute required="false" rtexprvalue="true" description="The href to use when performing a filter on this column"
+ * Set an href used to build URIs to change the filter state for this header cell. Only one of this and
+ * the {@link #setFilterAction(String)} attribute may be set on this tag.
+ * @param filterHref the filter href
+ * @jsptagref.attributedescription
+ * Set an href used to build URIs to change the filter state for this header cell. Only one of this and
+ * the {@link #setFilterAction(String)} attribute may be set on this tag.
+ * @jsptagref.attributesyntaxvalue <i>string_filterHref</i>
+ * @netui:attribute required="false" rtexprvalue="true"
+ * description="The href to use when performing a filter on this column"
*/
public void setFilterHref(String filterHref) {
_headerCellModel.setFilterHref(filterHref);
}
/**
- * @netui:attribute required="false" rtexprvalue="true" description="Boolean switch that sets whether the default filter link should be rendered"
+ * Set a boolean which can be used to enable / disable rendering of UI associated with sorting inside
+ * of the data grid.
+ * @param disableSortRendering boolean to enable / disable sort UI rendering
+ * @jsptagref.attributedescription
+ * Set a boolean which can be used to enable / disable rendering of UI associated with sorting inside
+ * of the data grid.
+ * @jsptagref.attributesyntaxvalue <i>string_disableSortRendering</i>
+ * @netui:attribute required="false" rtexprvalue="true"
+ * description="Boolean to enable / disable sort UI rendering"
*/
public void setDisableSortRendering(boolean disableSortRendering) {
_headerCellModel.setDisableSortRendering(disableSortRendering);
}
/**
- * @netui:attribute required="false" rtexprvalue="true" description="String expression that represents the field to filter when filtering data in this column"
+ * Set the sort expression for this header cell. The value of this attribute is used to lookup
+ * {@link org.apache.beehive.netui.databinding.datagrid.api.sort.Sort} state for a data grid
+ * If sorts are found matching this filter expression, the column is said to be 'sorted'. When
+ * a column is sorted, it is possible for the header cell UI to change to allow changing or
+ * removing the filter. By default, the UI for sorting is a clickable arrow that indicates whether
+ * a column of data is sorted ascending, descending, or not at all. To have data cells
+ * rendered with sort information, this sort expression value should be set on the
+ * {@link AbstractHtmlTableCell#setSortExpression(String)} attribute for cell tags rendered
+ * inside of the {@link Rows} tag.
+ *
+ * @param sortExpression the sort expression
+ * @jsptagref.attributedescription
+ * @jsptagref.attributesyntaxvalue <i>string_sortExpression</i>
+ * @netui:attribute required="false" rtexprvalue="true"
+ * description="String sort expression that is used to lookup a data grid's Sort state"
*/
public void setSortExpression(String sortExpression) {
_headerCellModel.setSortExpression(sortExpression);
}
/**
- * @netui:attribute required="false" rtexprvalue="true" description="The action to run when performing a filter on this column"
+ * Set the name of an action used to perform sorting on a data grid. This action must exist in the context
+ * of the current Page Flow. It is used to build anchor URIs that when clicked change or display UI that allows
+ * for change to the cell's sort state. Only one of this and the {@link #setSortHref(String)} may be
+ * set on this tag.
+ * @param sortAction the sort action
+ * @jsptagref.attributedescription
+ * @jsptagref.attributesyntaxvalue <i>string_sortAction</i>
+ * @netui:attribute required="false" rtexprvalue="true"
+ * description="The action used to build URIs used to change the sort state of this cell"
*/
public void setSortAction(String sortAction) {
_headerCellModel.setSortAction(sortAction);
}
/**
- * @netui:attribute required="false" rtexprvalue="true" description="The href to use when performing a filter on this column"
+ * Set an href used to build URIs to change the sort state for this header cell. Only one of this and
+ * the {@link #setSortAction(String)} attribute may be set on this tag.
+ * @param sortHref the sort href
+ * @jsptagref.attributedescription
+ * Set an href used to build URIs to change the sort state for this header cell. Only one of this and
+ * the {@link #setSortAction(String)} attribute may be set on this tag.
+ * @jsptagref.attributesyntaxvalue <i>string_sortHref</i>
+ * @netui:attribute required="false" rtexprvalue="true"
+ * description="The href to use when performing a sort on this column"
*/
public void setSortHref(String sortHref) {
_headerCellModel.setSortHref(sortHref);
@@ -169,143 +341,132 @@
*/
/**
- * Sets the onClick JavaScript event.
+ * Sets the onClick JavaScript for the HTML th tag.
*
* @param onClick the onClick event.
- * @jsptagref.attributedescription The onClick JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onClick JavaScript for the HTML th 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 th tag."
*/
public void setCellOnClick(String onClick) {
_cellState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONCLICK, onClick);
}
/**
- * Sets the onDblClick JavaScript event.
+ * Sets the onDblClick JavaScript for the HTML th tag.
*
* @param onDblClick the onDblClick event.
- * @jsptagref.attributedescription The onDblClick JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onDblClick JavaScript for the HTML th 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 th tag."
*/
public void setCellOnDblClick(String onDblClick) {
_cellState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONDBLCLICK, onDblClick);
}
/**
- * Sets the onKeyDown JavaScript event.
+ * Sets the onKeyDown JavaScript for the HTML th tag.
*
* @param onKeyDown the onKeyDown event.
- * @jsptagref.attributedescription The onKeyDown JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onKeyDown JavaScript for the HTML th 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 th tag."
*/
public void setCellOnKeyDown(String onKeyDown) {
_cellState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONKEYDOWN, onKeyDown);
}
/**
- * Sets the onKeyUp JavaScript event.
+ * Sets the onKeyUp JavaScript for the HTML th tag.
*
* @param onKeyUp the onKeyUp event.
- * @jsptagref.attributedescription The onKeyUp JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onKeyUp JavaScript for the HTML th 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 th tag."
*/
public void setCellOnKeyUp(String onKeyUp) {
_cellState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONKEYUP, onKeyUp);
}
/**
- * Sets the onKeyPress JavaScript event.
+ * Sets the onKeyPress JavaScript for the HTML th tag.
*
* @param onKeyPress the onKeyPress event.
- * @jsptagref.attributedescription The onKeyPress JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onKeyPress JavaScript event for the HTML th 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 th tag."
*/
public void setCellOnKeyPress(String onKeyPress) {
_cellState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONKEYPRESS, onKeyPress);
}
/**
- * Sets the onMouseDown JavaScript event.
+ * Sets the onMouseDown JavaScript for the HTML th tag.
*
* @param onMouseDown the onMouseDown event.
- * @jsptagref.attributedescription The onMouseDown JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onMouseDown JavaScript for the HTML th 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 th tag."
*/
public void setCellOnMouseDown(String onMouseDown) {
_cellState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEDOWN, onMouseDown);
}
/**
- * Sets the onMouseUp JavaScript event.
+ * Sets the onMouseUp JavaScript for the HTML th tag.
*
* @param onMouseUp the onMouseUp event.
- * @jsptagref.attributedescription The onMouseUp JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onMouseUp JavaScript for the HTML th 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 th tag."
*/
public void setCellOnMouseUp(String onMouseUp) {
_cellState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEUP, onMouseUp);
}
/**
- * Sets the onMouseMove JavaScript event.
+ * Sets the onMouseMove JavaScript for the HTML th tag.
*
* @param onMouseMove the onMouseMove event.
- * @jsptagref.attributedescription The onMouseMove JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onMouseMove JavaScript for the HTML th 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 th tag."
*/
public void setCellOnMouseMove(String onMouseMove) {
_cellState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEMOVE, onMouseMove);
}
/**
- * Sets the onMouseOut JavaScript event.
+ * Sets the onMouseOut JavaScript for the HTML th tag.
*
* @param onMouseOut the onMouseOut event.
- * @jsptagref.attributedescription The onMouseOut JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onMouseOut JavaScript event for the HTML th 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 th tag."
*/
public void setCellOnMouseOut(String onMouseOut) {
_cellState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEOUT, onMouseOut);
}
/**
- * Sets the onMouseOver JavaScript event.
+ * Sets the onMouseOver JavaScript for the HTML th tag.
*
* @param onMouseOver the onMouseOver event.
- * @jsptagref.attributedescription The onMouseOver JavaScript event.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The onMouseOver JavaScript for the HTML th 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 th tag."
*/
public void setCellOnMouseOver(String onMouseOver) {
_cellState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEOVER, onMouseOver);
}
/**
- * Sets the style of the rendered html tag.
+ * Sets the style for the HTML th tag.
*
- * @param style the html style.
- * @jsptagref.attributedescription The style.
- * @jsptagref.databindable false
+ * @param style the style
+ * @jsptagref.attributedescription The style for the HTML th 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 for the HTML th tag."
*/
public void setCellStyle(String style) {
if("".equals(style)) return;
@@ -314,13 +475,12 @@
}
/**
- * Sets the style class of the rendered html tag.
+ * Sets the style class for the HTML th 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 th 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 th tag."
*/
public void setCellStyleClass(String styleClass) {
if("".equals(styleClass)) return;
@@ -329,52 +489,49 @@
}
/**
- * Sets the value of the title attribute.
+ * Sets the value of the title attribute for the HTML th tag.
*
- * @param title
- * @jsptagref.attributedescription The title.
- * @jsptagref.databindable false
+ * @param title the title
+ * @jsptagref.attributedescription The title for the HTML th 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 th tag."
*/
public void setCellTitle(String title) {
_cellState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.TITLE, title);
}
/**
- * Sets the value of the cell's rowspan attribute.
+ * Sets the value of the rowspan attribute for the HTML th tag.
*
- * @param rowSpan
- * @jsptagref.attributedescription The row span
- * @jsptagref.databindable false
- * @jsptagref.attributesyntaxvalue <i>string_rowspan</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The rowspan."
+ * @param rowSpan the rowspan
+ * @jsptagref.attributedescription The row span for the HTML th tag.
+ * @jsptagref.attributesyntaxvalue <i>int_rowspan</i>
+ * @netui:attribute required="false" rtexprvalue="true" description="The rowspan for the HTML th tag."
*/
public void setCellRowspan(int rowSpan) {
_cellState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.ROWSPAN, "" + rowSpan);
}
/**
- * Sets the value of the cell's colspan attribute.
+ * Sets the value of the colspan attribute for the HTML th tag.
*
- * @param colSpan
- * @jsptagref.attributedescription The colspan
- * @jsptagref.databindable false
- * @jsptagref.attributesyntaxvalue <i>string_colspan</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The colspan."
+ * @param colSpan the colspan
+ * @jsptagref.attributedescription The colspan for the HTML th tag.
+ * @jsptagref.attributesyntaxvalue <i>int_colspan</i>
+ * @netui:attribute required="false" rtexprvalue="true" description="The colspan for the HTML th tag."
*/
public void setCellColspan(int colSpan) {
_cellState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.COLSPAN, "" + colSpan);
}
/**
- * Sets the value of the horizontal align attribute.
+ * Sets the value of the horizontal align attribute for the HTML th tag..
*
- * @param align
- * @jsptagref.attributedescription The horizontal alignment.
- * @jsptagref.databindable true
+ * @param align the horizontal alignment
+ * @jsptagref.attributedescription The horizontal alignment for the HTML th tag.
* @jsptagref.attributesyntaxvalue <i>string_align</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The cell's horizontal alignment"
+ * @netui:attribute required="false" rtexprvalue="true"
+ * description="The horizontal alignment for the HTML th tag"
*/
public void setCellAlign(String align) {
/* todo: should this enforce left|center|right|justify|char as in the spec */
@@ -382,39 +539,39 @@
}
/**
- * Sets the value of the horizontal alignment character attribute.
+ * Sets the value of the horizontal alignment character attribute for the HTML th tag.
*
- * @param alignChar
- * @jsptagref.attributedescription The horizontal alignment character.
- * @jsptagref.databindable true
+ * @param alignChar the alignment character
+ * @jsptagref.attributedescription The horizontal alignment character for the HTML th tag.
* @jsptagref.attributesyntaxvalue <i>string_alignChar</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The cell's horizontal alignment character"
+ * @netui:attribute required="false" rtexprvalue="true"
+ * description="The horizontal alignment character for the HTML th tag."
*/
public void setCellChar(String alignChar) {
_cellState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.CHAR, alignChar);
}
/**
- * Sets the value of the horizontal alignment character offset attribute.
+ * Sets the value of the horizontal alignment character offset for the HTML th tag..
*
- * @param alignCharOff
- * @jsptagref.attributedescription The horizontal alignment character offset
- * @jsptagref.databindable true
+ * @param alignCharOff the horizontal alignment character offset
+ * @jsptagref.attributedescription The horizontal alignment character offset for the HTML th tag.
* @jsptagref.attributesyntaxvalue <i>string_alignCharOff</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The cell's horizontal alignment character offset"
+ * @netui:attribute required="false" rtexprvalue="true"
+ * description="The horizontal alignment character offset for the HTML th tag."
*/
public void setCellCharoff(String alignCharOff) {
_cellState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.CHAROFF, alignCharOff);
}
/**
- * Sets the value of the vertical alignment attribute.
+ * Sets the value of the vertical alignment attribute for the HTML th tag.
*
- * @param align
- * @jsptagref.attributedescription The vertical alignment.
- * @jsptagref.databindable true
- * @jsptagref.attributesyntaxvalue <i>string_align</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The cell's vertical alignment"
+ * @param align the vertical alignment attribute
+ * @jsptagref.attributedescription The vertical alignment for the HTML th tag.
+ * @jsptagref.attributesyntaxvalue <i>string_cellValign</i>
+ * @netui:attribute required="false" rtexprvalue="true"
+ * description="The cell's vertical alignment for the HTML th tag."
*/
public void setCellValign(String align) {
/* todo: should this enforce top|middle|bottom|baseline as in the spec */
@@ -422,101 +579,110 @@
}
/**
- * Sets the value of the language attribute.
+ * Sets the value of the language attribute for the HTML th tag.
*
- * @param lang
- * @jsptagref.attributedescription The language.
- * @jsptagref.databindable true
- * @jsptagref.attributesyntaxvalue <i>string_lang</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The cell's language"
+ * @param lang the language attribute
+ * @jsptagref.attributedescription The language for the HTML th tag.
+ * @jsptagref.attributesyntaxvalue <i>string_cellLang</i>
+ * @netui:attribute required="false" rtexprvalue="true" description="The language attribute for the HTML th tag."
*/
public void setCellLang(String lang) {
_cellState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.LANG, lang);
}
/**
- * Sets the value of the text direction attribute.
+ * Sets the value of the text direction attribute for the HTML th tag.
*
- * @param dir
- * @jsptagref.attributedescription The text direction attribute.
- * @jsptagref.databindable true
- * @jsptagref.attributesyntaxvalue <i>string_dir</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The cell's text direction"
+ * @param dir the text direction
+ * @jsptagref.attributedescription The text direction attribute for the HTML th tag.
+ * @jsptagref.attributesyntaxvalue <i>string_cellDir</i>
+ * @netui:attribute required="false" rtexprvalue="true" description="The text direction for the HTML th tag."
*/
public void setCellDir(String dir) {
_cellState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.DIR, dir);
}
/**
- * Sets the value of the abbreviated form of the cell's content.
+ * Sets the value of the abbreviated form of the content for the HTML th tag.
*
- * @param abbr
- * @jsptagref.attributedescription The abbreviated form of the cell's content.
- * @jsptagref.databindable true
- * @jsptagref.attributesyntaxvalue <i>string_dir</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The abbreviated form of the cell's content"
+ * @param abbr the abbr
+ * @jsptagref.attributedescription The abbreviated form of the cell's content for the HTML th tag.
+ * @jsptagref.attributesyntaxvalue <i>string_cellDir</i>
+ * @netui:attribute required="false" rtexprvalue="true" description="The abbreviated form of the cell's content for the HTML th tag."
*/
public void setCellAbbr(String abbr) {
_cellState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.ABBR, abbr);
}
/**
- * Sets the value of the axis attribute.
+ * Sets the value of the axis attribute for the HTML th tag.
*
- * @param axis
- * @jsptagref.attributedescription The axis attribute.
- * @jsptagref.databindable true
- * @jsptagref.attributesyntaxvalue <i>string_axis</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The axis attribute"
+ * @param axis the axis
+ * @jsptagref.attributedescription The axis attribute for the HTML th tag.
+ * @jsptagref.attributesyntaxvalue <i>string_cellAxis</i>
+ * @netui:attribute required="false" rtexprvalue="true" description="The axis attribute for the HTML th tag"
*/
public void setCellAxis(String axis) {
_cellState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.AXIS, axis);
}
/**
- * Sets the value of the headers attribute.
+ * Sets the value of the headers attribute for the HTML th tag.
*
- * @param headers
- * @jsptagref.attributedescription The headers attribute.
- * @jsptagref.databindable true
- * @jsptagref.attributesyntaxvalue <i>string_headers</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The headers attribute"
+ * @param headers the headers
+ * @jsptagref.attributedescription The headers attribute for the HTML th tag.
+ * @jsptagref.attributesyntaxvalue <i>string_cellHeaders</i>
+ * @netui:attribute required="false" rtexprvalue="true" description="The headers attribute for the HTML th tag."
*/
public void setCellHeaders(String headers) {
_cellState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.HEADERS, headers);
}
/**
- * Sets the value of the scope attribute.
+ * Sets the value of the scope attribute for the HTML th tag.
*
- * @param scope
- * @jsptagref.attributedescription The scope attribute.
- * @jsptagref.databindable true
- * @jsptagref.attributesyntaxvalue <i>string_scope</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The scope attribute"
+ * @param scope the scope
+ * @jsptagref.attributedescription The scope attribute for the HTML th tag.
+ * @jsptagref.attributesyntaxvalue <i>string_cellScope</i>
+ * @netui:attribute required="false" rtexprvalue="true" description="The scope attribute for the HTML th tag.
*/
public void setCellScope(String scope) {
_cellState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.SCOPE, scope);
}
/**
- * Set the name of the tagId for the th tag.
+ * Set the name of the tagId for the HTML th tag.
*
* @param tagId the the name of the tagId for the th tag.
- * @jsptagref.attributedescription The tagId.
- * @jsptagref.databindable false
- * @jsptagref.attributesyntaxvalue <i>string_tagId</i>
+ * @jsptagref.attributedescription The tagId for the HTML th tag.
+ * @jsptagref.attributesyntaxvalue <i>string_cellTagId</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 th tag."
*/
public void setCellTagId(String tagId)
throws JspException {
applyTagId(_cellState, tagId);
}
-
+ /**
+ * <p>
+ * Implementation of the {@link org.apache.beehive.netui.tags.IAttributeConsumer} interface. This
+ * allows users of the anchorCell tag to extend the attribute set that is rendered by the HTML
+ * anchor. This method accepts the following facets:
+ * <table>
+ * <tr><td>Facet Name</td><td>Operation</td></tr>
+ * <tr><td><code>header</code></td><td>Adds an attribute with the provided <code>name</code> and <code>value</code> to the
+ * attributes rendered on the <th> tag.</td></tr>
+ * </table>
+ * The HeaderCell tag defaults to the setting attributes on the header 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(ATTRIBUTE_HEADER_NAME)) {
+ if(facet == null || facet.equals(ATTRIBUTE_HEADER_NAME)) {
super.addStateAttribute(_cellState, name, value);
}
else {
@@ -525,6 +691,26 @@
}
}
+ /**
+ * <p>
+ * Implementation of the {@link IBehaviorConsumer} interface that extends the functionality of this
+ * tag beyond that exposed via the JSP tag attributes. This method accepts the following facets:
+ * <table>
+ * <tr><td>Facet Name</td><td>Operation</td></tr>
+ * <tr><td><code>renderer</code></td><td>Extends the cell decorator chain used to implement rendering for this tag</td></tr>
+ * </table>
+ * The <code>renderer</code> facet accepts the following behavior names. The value of each should be a String classname
+ * of a class that extends the {@link CellDecorator} base class.
+ * <table>
+ * <tr><td>extends</td><td>Add an additional decorator to the currently configured cell decorator chain.</td></tr>
+ * <tr><td>sort</td><td>Replace the currently configured sort decorator with one created from this class name.</td></tr>
+ * </table>
+ * </p>
+ * @param name the name of the behavior
+ * @param value the value of the behavior
+ * @param facet th ebehavior's facet
+ * @throws JspException when the behavior's facet isnot recognized
+ */
public void setBehavior(String name, Object value, String facet) throws JspException {
if(facet != null && facet.equals(BEHAVIOR_RENDERER_NAME)) {
String className = value != null ? value.toString() : null;
@@ -538,7 +724,7 @@
}
/* replace the core cell decorator with a new default */
else if(name.equals(BEHAVIOR_RENDERER_NAME_DEFAULT)) {
- /* no-op */
+ /* nyi */
}
_cellDecorator = cellDecorator;
@@ -549,10 +735,25 @@
}
}
+ /**
+ * Implementation of {@link AbstractHtmlTableCell#internalGetCellModel()} that exposes the
+ * {@link org.apache.beehive.netui.databinding.datagrid.runtime.model.cell.HeaderCellModel}
+ * which is storing state for this tag.
+ * @return this tag's cell model
+ */
protected CellModel internalGetCellModel() {
return _headerCellModel;
}
+ /**
+ * Render the header cell's contents. This method sets the style information on the HTML
+ * th tag and then calls the
+ * {@link #renderHeaderCellContents(org.apache.beehive.netui.tags.rendering.AbstractRenderAppender, String)}
+ * method to render the contents of the cell.
+ * @param appender the {@link AbstractRenderAppender} to which the output from this tag should be added
+ * @throws IOException
+ * @throws JspException
+ */
protected void renderCell(AbstractRenderAppender appender)
throws IOException, JspException {
@@ -603,9 +804,15 @@
if(script != null)
appender.append(script);
}
-
}
+ /**
+ * Render the contents of the body of the HTML th tag into the given {@link AbstractRenderAppender}
+ * @param appender the {@link AbstractRenderAppender} for the output
+ * @param jspFragmentOutput the result of having evaluated the tag's {@link JspFragment}
+ * @throws IOException when an error occurs writing to the output stream
+ * @throws JspException when an error occurs evaluating the {@link JspFragment} for this body
+ */
protected void renderHeaderCellContents(AbstractRenderAppender appender, String jspFragmentOutput)
throws IOException, JspException {
@@ -621,6 +828,10 @@
}
}
+ /**
+ * Apply the tag's attributes to the {@link HeaderCellModel}.
+ * @throws JspException when errors are encountered applying the attributes
+ */
protected void applyAttributes()
throws JspException {
super.applyAttributes();
@@ -650,6 +861,10 @@
}
}
+ /**
+ * Internal method used to get the outer {@link CellDecorator}.
+ * @return the outer cell decorator
+ */
private CellDecorator getCellDecorator() {
if(_cellDecorator != null)
return _cellDecorator;