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 00:11:32 UTC
svn commit: r170271 [1/3] - in
/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding:
datagrid/ invoke/
Author: ekoneil
Date: Sun May 15 15:11:30 2005
New Revision: 170271
URL: http://svn.apache.org/viewcvs?rev=170271&view=rev
Log:
Data grid Javadoc.
BB: self
DRT: Beehive pass
Modified:
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/ConfigurePager.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/DataGridUtil.java
incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Footer.java
incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Header.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/ImageCell.java
incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/RenderPager.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/Rows.java
incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/SpanCell.java
incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/TemplateCell.java
incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/invoke/AbstractCallMethod.java
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=170271&r1=170270&r2=170271&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 15:11:30 2005
@@ -88,9 +88,10 @@
*/
/**
- * Sets the onClick javascript event for the HTML table cell.
+
+ * Sets the onClick JavaScript event.
*
- * @param onClick - the onClick event.
+ * @param onClick the onClick event.
* @jsptagref.attributedescription The onClick JavaScript event for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_onClick</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onClick JavaScript event."
@@ -102,7 +103,7 @@
/**
* Sets the onDblClick javascript event for the HTML table cell.
*
- * @param onDblClick - the onDblClick event.
+ * @param onDblClick the onDblClick event.
* @jsptagref.attributedescription The onDblClick JavaScript event for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_onDblClick</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onDblClick JavaScript event."
@@ -114,7 +115,7 @@
/**
* Sets the onKeyDown javascript event for the HTML table cell.
*
- * @param onKeyDown - the onKeyDown event.
+ * @param onKeyDown the onKeyDown event.
* @jsptagref.attributedescription The onKeyDown JavaScript event for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_onKeyDown</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onKeyDown JavaScript event."
@@ -126,7 +127,7 @@
/**
* Sets the onKeyUp javascript event for the HTML table cell.
*
- * @param onKeyUp - the onKeyUp event.
+ * @param onKeyUp the onKeyUp event.
* @jsptagref.attributedescription The onKeyUp JavaScript event for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_onKeyUp</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onKeyUp JavaScript event."
@@ -138,7 +139,7 @@
/**
* Sets the onKeyPress javascript event for the HTML table cell.
*
- * @param onKeyPress - the onKeyPress event.
+ * @param onKeyPress the onKeyPress event.
* @jsptagref.attributedescription The onKeyPress JavaScript event for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_onKeyPress</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onKeyPress JavaScript event."
@@ -150,7 +151,7 @@
/**
* Sets the onMouseDown javascript event for the HTML table cell.
*
- * @param onMouseDown - the onMouseDown event.
+ * @param onMouseDown the onMouseDown event.
* @jsptagref.attributedescription The onMouseDown JavaScript event for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_onMouseDown</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onMouseDown JavaScript event."
@@ -162,7 +163,7 @@
/**
* Sets the onMouseUp javascript event for the HTML table cell.
*
- * @param onMouseUp - the onMouseUp event.
+ * @param onMouseUp the onMouseUp event.
* @jsptagref.attributedescription The onMouseUp JavaScript event for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_onMouseUp</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onMouseUp JavaScript event."
@@ -174,7 +175,7 @@
/**
* Sets the onMouseMove javascript event for the HTML table cell.
*
- * @param onMouseMove - the onMouseMove event.
+ * @param onMouseMove the onMouseMove event.
* @jsptagref.attributedescription The onMouseMove JavaScript event for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_onMouseMove</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onMouseMove JavaScript event."
@@ -186,7 +187,7 @@
/**
* Sets the onMouseOut javascript event for the HTML table cell.
*
- * @param onMouseOut - the onMouseOut event.
+ * @param onMouseOut the onMouseOut event.
* @jsptagref.attributedescription The onMouseOut JavaScript event for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_onMouseOut</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onMouseOut JavaScript event."
@@ -198,7 +199,7 @@
/**
* Sets the onMouseOver javascript event for the HTML table cell.
*
- * @param onMouseOver - the onMouseOver event.
+ * @param onMouseOver the onMouseOver event.
* @jsptagref.attributedescription The onMouseOver JavaScript event for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_onMouseOver</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onMouseOver JavaScript event."
@@ -210,7 +211,7 @@
/**
* Sets the style attribute for the HTML table cell.
*
- * @param style - the html style.
+ * @param style the html style.
* @jsptagref.attributedescription The style attribute for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_style</i>
* @netui:attribute required="false" rtexprvalue="true" description="The style attribute."
@@ -224,7 +225,7 @@
/**
* Sets the style class attribute for the HTML table cell.
*
- * @param styleClass - the html style class.
+ * @param styleClass the html style class.
* @jsptagref.attributedescription The style class attribute for the HTML table cell.
* @jsptagref.attributesyntaxvalue <i>string_style_class</i>
* @netui:attribute required="false" rtexprvalue="true" description="The style class."
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=170271&r1=170270&r2=170271&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 15:11:30 2005
@@ -4,7 +4,7 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -37,9 +37,83 @@
import org.apache.beehive.netui.util.Bundle;
/**
- * @jsptagref.tagdescription Renders a data grid cell containing an HTML anchor.
+ * <p>
+ * Data grid cell used to render an HTML anchor. This tag should be used inside of a <netui-data:rows> tag
+ * when rendering a data set with the <netui-data:dataGrid> tag. An AnchorCell is used to render an HTML
+ * <a> tag. The rendered href is provided with either the action or href attributes. If an action is provided,
+ * the action must exist inside of the 'current' Page Flow with which the JSP is associated. If the href is provided,
+ * the anchor will use this value as its rendered href. For example:
+ * <pre>
+ * <netui-data:anchorCell href="foo.jsp" value="Go To Foo"/>
+ * </pre>
+ * will render:
+ * <pre>
+ * <a href="foo.jsp">Go To Foo</a>
+ * </pre>
+ * </p>
+ * <p>
+ * The AnchorCell tag can also accept NetUI parameter tags that implement the {@link IUrlParams} interface. When
+ * these tags are contained inside of this tag, they add URL parameters onto the rendered href. For example:
+ * <pre>
+ * <netui-data:anchorCell href="foo.jsp" value="Go To Foo">
+ * <netui:parameter name="paramKey" value="paramValue"/>
+ * </netui-data:anchorCell>
+ * </pre>
+ * will render:
+ * <pre>
+ * <a href="foo.jsp?paramKey=paramValue">Go To Foo</a>
+ * </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>
+ *
+ * @jsptagref.tagdescription
+ * <p>
+ * Data grid cell used to render an HTML anchor. This tag should be used inside of a <netui-data:rows> tag
+ * when rendering a data set with the <netui-data:dataGrid> tag. An AnchorCell is used to render an HTML
+ * <a> tag. The rendered href is provided with either the action or href attributes. If an action is provided,
+ * the action must exist inside of the 'current' Page Flow with which the JSP is associated. If the href is provided,
+ * the anchor will use this value as its rendered href. For example:
+ * <pre>
+ * <netui-data:anchorCell href="foo.jsp" value="Go To Foo"/>
+ * </pre>
+ * will render:
+ * <pre>
+ * <a href="foo.jsp">Go To Foo</a>
+ * </pre>
+ * </p>
+ * <p>
+ * The AnchorCell tag can also accept NetUI parameter tags that implement the {@link IUrlParams} interface. When
+ * these tags are contained inside of this tag, they add URL parameters onto the rendered href. For example:
+ * <pre>
+ * <netui-data:anchorCell href="foo.jsp" value="Go To Foo">
+ * <netui:parameter name="paramKey" value="paramValue"/>
+ * </netui-data:anchorCell>
+ * </pre>
+ * will render:
+ * <pre>
+ * <a href="foo.jsp?paramKey=paramValue">Go To Foo</a>
+ * </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>
+ *
* @netui:tag name="anchorCell" body-content="scriptless"
- * description="Renders a data grid table cell containing an HTML anchor"
+ * description="Renders an HTML table cell inside of a data grid that contains an anchor"
*/
public class AnchorCell
extends AbstractHtmlTableCell
@@ -57,11 +131,10 @@
}
/**
- * Sets the onClick javascript event.
+ * Sets the onClick JavaScript event for the HTML anchor.
*
- * @param onClick - the onClick event.
- * @jsptagref.attributedescription The onClick JavaScript event.
- * @jsptagref.databindable false
+ * @param onClick the onClick event for the HTML anchor.
+ * @jsptagref.attributedescription The onClick JavaScript event for the HTML anchor.
* @jsptagref.attributesyntaxvalue <i>string_onClick</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onClick JavaScript event."
*/
@@ -70,10 +143,10 @@
}
/**
- * Sets the onDblClick javascript event.
+ * Sets the onDblClick JavaScript event for the HTML anchor.
*
- * @param onDblClick - the onDblClick event.
- * @jsptagref.attributedescription The onDblClick JavaScript event.
+ * @param onDblClick the onDblClick event.
+ * @jsptagref.attributedescription The onDblClick JavaScript event for the HTML anchor.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_onDblClick</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onDblClick JavaScript event."
@@ -83,10 +156,10 @@
}
/**
- * Sets the onKeyDown javascript event.
+ * Sets the onKeyDown JavaScript event for the HTML anchor.
*
- * @param onKeyDown - the onKeyDown event.
- * @jsptagref.attributedescription The onKeyDown JavaScript event.
+ * @param onKeyDown the onKeyDown event.
+ * @jsptagref.attributedescription The onKeyDown JavaScript event for the HTML anchor.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_onKeyDown</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onKeyDown JavaScript event."
@@ -96,10 +169,10 @@
}
/**
- * Sets the onKeyUp javascript event.
+ * Sets the onKeyUp JavaScript event for the HTML anchor.
*
- * @param onKeyUp - the onKeyUp event.
- * @jsptagref.attributedescription The onKeyUp JavaScript event.
+ * @param onKeyUp the onKeyUp event.
+ * @jsptagref.attributedescription The onKeyUp JavaScript event for the HTML anchor.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_onKeyUp</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onKeyUp JavaScript event."
@@ -109,10 +182,10 @@
}
/**
- * Sets the onKeyPress javascript event.
+ * Sets the onKeyPress JavaScript event for the HTML anchor.
*
- * @param onKeyPress - the onKeyPress event.
- * @jsptagref.attributedescription The onKeyPress JavaScript event.
+ * @param onKeyPress the onKeyPress event.
+ * @jsptagref.attributedescription The onKeyPress JavaScript event for the HTML anchor.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_onKeyPress</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onKeyPress JavaScript event."
@@ -122,10 +195,10 @@
}
/**
- * Sets the onMouseDown javascript event.
+ * Sets the onMouseDown JavaScript event for the HTML anchor.
*
- * @param onMouseDown - the onMouseDown event.
- * @jsptagref.attributedescription The onMouseDown JavaScript event.
+ * @param onMouseDown the onMouseDown event.
+ * @jsptagref.attributedescription The onMouseDown JavaScript event for the HTML anchor.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_onMouseDown</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onMouseDown JavaScript event."
@@ -135,10 +208,10 @@
}
/**
- * Sets the onMouseUp javascript event.
+ * Sets the onMouseUp JavaScript event for the HTML anchor.
*
- * @param onMouseUp - the onMouseUp event.
- * @jsptagref.attributedescription The onMouseUp JavaScript event.
+ * @param onMouseUp the onMouseUp event.
+ * @jsptagref.attributedescription The onMouseUp JavaScript event for the HTML anchor.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_onMouseUp</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onMouseUp JavaScript event."
@@ -148,10 +221,10 @@
}
/**
- * Sets the onMouseMove javascript event.
+ * Sets the onMouseMove JavaScript event for the HTML anchor.
*
- * @param onMouseMove - the onMouseMove event.
- * @jsptagref.attributedescription The onMouseMove JavaScript event.
+ * @param onMouseMove the onMouseMove event.
+ * @jsptagref.attributedescription The onMouseMove JavaScript event for the HTML anchor.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_onMouseMove</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onMouseMove JavaScript event."
@@ -161,10 +234,10 @@
}
/**
- * Sets the onMouseOut javascript event.
+ * Sets the onMouseOut JavaScript event for the HTML anchor.
*
- * @param onMouseOut - the onMouseOut event.
- * @jsptagref.attributedescription The onMouseOut JavaScript event.
+ * @param onMouseOut the onMouseOut event.
+ * @jsptagref.attributedescription The onMouseOut JavaScript event for the HTML anchor.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_onMouseOut</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onMouseOut JavaScript event."
@@ -174,10 +247,10 @@
}
/**
- * Sets the onMouseOver javascript event.
+ * Sets the onMouseOver JavaScript event for the HTML anchor.
*
- * @param onMouseOver - the onMouseOver event.
- * @jsptagref.attributedescription The onMouseOver JavaScript event.
+ * @param onMouseOver the onMouseOver event.
+ * @jsptagref.attributedescription The onMouseOver JavaScript event for the HTML anchor.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_onMouseOver</i>
* @netui:attribute required="false" rtexprvalue="true" description="The onMouseOver JavaScript event."
@@ -187,13 +260,12 @@
}
/**
- * Sets the style of the rendered html tag.
+ * Sets the style of the HTML anchor.
*
- * @param style - the html style.
- * @jsptagref.attributedescription The style.
- * @jsptagref.databindable false
+ * @param style the style attribute
+ * @jsptagref.attributedescription The style for the HTML anchor.
* @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 anchor"
*/
public void setStyle(String style) {
if("".equals(style)) return;
@@ -202,13 +274,12 @@
}
/**
- * Sets the style class of the rendered html tag.
+ * Sets the style class of the HTML anchor.
*
- * @param styleClass - the html style class.
- * @jsptagref.attributedescription The style class.
- * @jsptagref.databindable false
+ * @param styleClass the style attribute.
+ * @jsptagref.attributedescription The style class for the HTML anchor.
* @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 anchor"
*/
public void setStyleClass(String styleClass) {
if("".equals(styleClass)) return;
@@ -217,41 +288,36 @@
}
/**
- * Sets the value of the title attribute.
+ * Sets the value of the title attribute for the HTML anchor
*
- * @param title
- * @jsptagref.attributedescription The title.
- * @jsptagref.databindable false
+ * @param title the title attribute
+ * @jsptagref.attributedescription The title attribute for the HTML anchor.
* @jsptagref.attributesyntaxvalue <i>string_title</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The title. "
+ * @netui:attribute required="false" rtexprvalue="true" description="The title attribute for the anchor"
*/
public void setTitle(String title) {
_anchorState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.TITLE, title);
}
/**
- * Sets <code>charset</code> attribute for the anchor.
+ * Sets <code>charset</code> attribute for the HTML anchor.
*
- * @param charSet - the window target.
- * @jsptagref.attributedescription The character set.
- * @jsptagref.databindable false
+ * @param charSet the charSet attribute for the HTML anchor.
+ * @jsptagref.attributedescription The charSet attribute for the HTML anchor.
* @jsptagref.attributesyntaxvalue <i>string_charset</i>
- * @netui:attribute required="false" rtexprvalue="true"
- * description="The character set."
+ * @netui:attribute required="false" rtexprvalue="true" description="The character set."
*/
public void setCharset(String charSet) {
_anchorState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.CHARSET, charSet);
}
/**
- * Sets <code>type</code> attribute for the anchor.
+ * Sets <code>type</code> attribute for the HTML anchor.
*
- * @param type - the window target.
- * @jsptagref.attributedescription The type.
- * @jsptagref.databindable false
+ * @param type the type attribute
+ * @jsptagref.attributedescription The type attribute for the HTML anchor.
* @jsptagref.attributesyntaxvalue <i>string_type</i>
- * @netui:attribute required="false" rtexprvalue="true"
- * description="The type."
+ * @netui:attribute required="false" rtexprvalue="true" description="The attribute for the HTML anchor"
*/
public void setType(String type) {
_anchorState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.TYPE, type);
@@ -260,69 +326,59 @@
/**
* Sets <code>hreflang</code> attribute for the anchor.
*
- * @param hreflang - the window target.
- * @jsptagref.attributedescription The HREF lang.
- * @jsptagref.databindable false
+ * @param hreflang the hreflang attribute
+ * @jsptagref.attributedescription The hrefLang attribute for the HTML anchor.
* @jsptagref.attributesyntaxvalue <i>string_hreflang</i>
- * @netui:attribute required="false" rtexprvalue="true"
- * description="The HREF lang."
+ * @netui:attribute required="false" rtexprvalue="true" description="The HREF lang attribute for the HTML anchor."
*/
public void setHrefLang(String hreflang) {
_anchorState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.HREFLANG, hreflang);
}
/**
- * Sets <code>rel</code> attribute for the anchor.
+ * Sets <code>rel</code> attribute for the HTML anchor.
*
- * @param rel - the window target.
- * @jsptagref.attributedescription The rel attribute for the anchor.
- * @jsptagref.databindable false
+ * @param rel the rel attribute
+ * @jsptagref.attributedescription The rel attribute for the HTML anchor.
* @jsptagref.attributesyntaxvalue <i>string_rel</i>
- * @netui:attribute required="false" rtexprvalue="true"
- * description="The rel."
+ * @netui:attribute required="false" rtexprvalue="true" description="The rel for the HTML anchor."
*/
public void setRel(String rel) {
_anchorState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.REL, rel);
}
/**
- * Sets <code>rev</code> attribute for the anchor.
+ * Sets <code>rev</code> attribute for the HTML anchor.
*
- * @param rev - the window target.
- * @jsptagref.attributedescription The rev.
- * @jsptagref.databindable false
+ * @param rev the rev target for the HTML anchor
+ * @jsptagref.attributedescription The rev for the HTML anchor.
* @jsptagref.attributesyntaxvalue <i>string_rev</i>
- * @netui:attribute required="false" rtexprvalue="true"
- * description="The rev."
+ * @netui:attribute required="false" rtexprvalue="true" description="The rev for the HTML anchor."
*/
public void setRev(String rev) {
_anchorState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.REV, rev);
}
/**
- * Sets the window target.
+ * Sets the window target for the HTML anchor.
*
- * @param target - the window target.
- * @jsptagref.attributedescription The window target.
- * @jsptagref.databindable false
- * @jsptagref.attributesyntaxvalue <i>string_action</i>
- * @netui:attribute required="false" rtexprvalue="true"
- * description="The window target."
+ * @param target the window target for the HTML anchor.
+ * @jsptagref.attributedescription The window target for the HTML anchor.
+ * @jsptagref.attributesyntaxvalue <i>string_target</i>
+ * @netui:attribute required="false" rtexprvalue="true" description="The window target."
*/
public void setTarget(String target) {
_anchorState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.TARGET, target);
}
/**
- * Sets the href of the Anchor. This attribute will accept the empty String as a legal value.
+ * Sets the href of the HTML anchor. This attribute will accept the empty String as a legal value.
*
- * @param href - the hyperlink URI for the Area.
+ * @param href the hyperlink URI for the HTML anchor.
* @jsptagref.attributedescription The URL to go to.
- * @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_href</i>
* @netui:attribute required="false" rtexprvalue="true"
- * description="The URL to go to."
- * reftype="url"
+ * description="The href of the HTML anchor."
*/
public void setHref(String href) {
_anchorCellModel.setHref(href);
@@ -332,18 +388,20 @@
* Set the target "scope" for the anchor's action. Multiple active page flows may exist concurrently within named
* scopes. This attribute selects which named scope to use. If omitted, the default scope is assumed.
*
- * @param targetScope - the name of the target scope in which the associated action's page flow resides.
+ * @param targetScope the name of the target scope in which the associated action's page flow resides.
* @jsptagref.attributedescription The target scope in which the associated action's page flow resides.
- * @jsptagref.databindable true
* @jsptagref.attributesyntaxvalue <i>string_targetScope</i>
- * @netui:attribute required="false" rtexprvalue="true"
- * description="The target scope in which the associated action's page flow resides"
+ * @netui:attribute required="false" rtexprvalue="true" description="The target scope in which the associated action's page flow resides"
*/
public void setTargetScope(String targetScope) {
_anchorCellModel.setScopeId(targetScope);
}
/**
+ * The text displayed for the HTML anchor.
+ * @param value the text displayed for the HTML anchor
+ * @jsptagref.attributedescription the text displayed for the HTML anchor
+ * @jsptagref.attributesyntaxvalue <i>string_value</i>
* @netui:attribute required="true" rtexprvalue="true"
*/
public void setValue(String value) {
@@ -351,15 +409,16 @@
}
/**
- * Set the name of the action for the Area.
+ * Set the name of the action for the HTML anchor. The action method must be in the Page Flow with which
+ * the containing JSP is associated.
*
- * @param action - the name of the action to set for the Area.
- * @jsptagref.attributedescription The action method to invoke. The action method must be in the Controller file
- * of the Page Flow directory.
- * @jsptagref.databindable false
+ * @param action the name of the action to set for the Area.
+ * @jsptagref.attributedescription The action method to invoke. The action method must be in Page Flow with which
+ * the containing JSP is associated.
* @jsptagref.attributesyntaxvalue <i>string_action</i>
* @netui:attribute required="false" rtexprvalue="true"
- * description="The action method to invoke. The action method must be in the Controller file of the Page Flow directory."
+ * description="The action method to invoke. The action method must be in the Page Flow with wihch the containing JSP
+ * is associated.
*/
public void setAction(String action)
throws JspException {
@@ -367,13 +426,12 @@
}
/**
- * Sets the lang attribute for the HTML element.
+ * Sets the lang attribute for the HTML anchor.
* @param lang
- * @jsptagref.attributedescription The lang.
+ * @jsptagref.attributedescription The lang attribute for the HTML anchor.
* @jsptagref.databindable false
* @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 anchor."
*/
public void setLang(String lang)
{
@@ -381,13 +439,11 @@
}
/**
- * Sets the lang attribute for the HTML element.
+ * Sets the dir attribute for the HTML anchor.
* @param dir
- * @jsptagref.attributedescription The dir.
- * @jsptagref.databindable false
+ * @jsptagref.attributedescription The dir attribute for the HTML anchor.
* @jsptagref.attributesyntaxvalue <i>string_dir</i>
- * @netui:attribute required="false" rtexprvalue="true"
- * description="The dir."
+ * @netui:attribute required="false" rtexprvalue="true" description="The dir attribute for the HTML anchor."
*/
public void setDir(String dir)
{
@@ -399,12 +455,11 @@
* keyboard navigation key. It is recommended not to use the following
* values because there are often used by browsers <code>A, C, E, F, G,
* H, V, left arrow, and right arrow</code>.
- * @param accessKey - the accessKey value.
+ * @param accessKey the accessKey value.
* @jsptagref.attributedescription The keyboard navigation key for the element.
* The following values are not recommended because they
* are often used by browsers: <code>A, C, E, F, G,
* H, V, left arrow, and right arrow</code>
- * @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_accessKey</i>
* @netui:attribute required="false" rtexprvalue="true" type="char"
* description=" The keyboard navigation key for the element.
@@ -420,10 +475,9 @@
/**
* Sets the tabIndex of the rendered html tag.
- * @param tabindex - the tab index.
+ * @param tabindex the tab index.
* @jsptagref.attributedescription The tabIndex of the rendered HTML tag. This attribute determines the position of the
* rendered HTML tag in the sequence of tags that the user may advance through by pressing the TAB key.
- * @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_tabIndex</i>
* @netui:attribute required="false" rtexprvalue="true" type="int"
* description="The tabIndex of the rendered HTML tag. This attribute determines the position of the
@@ -434,10 +488,9 @@
}
/**
- * Sets the onBlur javascript event.
- * @param onblur - the onBlur event.
- * @jsptagref.attributedescription The onBlur JavaScript event.
- * @jsptagref.databindable false
+ * Sets the onBlur JavaScript event for the HTML anchor.
+ * @param onblur the onBlur event.
+ * @jsptagref.attributedescription The onBlur JavaScript event for the HTML anchor.
* @jsptagref.attributesyntaxvalue <i>string_onBlur</i>
* @netui:attribute required="false" rtexprvalue="true"
* description="The onBlur JavaScript event."
@@ -448,10 +501,9 @@
}
/**
- * Sets the onFocus javascript event.
- * @param onfocus - the onFocus event.
- * @jsptagref.attributedescription The onFocus JavaScript event.
- * @jsptagref.databindable false
+ * Sets the onFocus JavaScript event for the HTML anchor.
+ * @param onfocus the onFocus event.
+ * @jsptagref.attributedescription The onFocus JavaScript event for the HTML anchor.
* @jsptagref.attributesyntaxvalue <i>string_onFocus</i>
* @netui:attribute required="false" rtexprvalue="true"
* description="The onFocus JavaScript event."
@@ -462,11 +514,13 @@
}
/**
- * Set the name of the tagId for the Anchor.
+ * <p>
+ * Set the name of the tagId for the HTML anchor. The provided tagId will have the index of the current
+ * row added as a suffix in order to keep the anchor tagIds unique in the page.
+ * </p>
*
- * @param tagId - the the name of the tagId for the anchor.
+ * @param tagId the the tagId for the HTML anchor.
* @jsptagref.attributedescription The tagId.
- * @jsptagref.databindable false
* @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. "
@@ -476,6 +530,23 @@
applyIndexedTagId(_anchorState, 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>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>
+ * </table>
+ * The AnchorCell 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))
@@ -484,11 +555,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:anchorCell href="foo.jsp" value="Go To Foo>
+ * <netui:parameter name="paramKey" value="paramValue"/>
+ * </netui-data:anchorCell>
+ * </pre>
+ * will render an HTML anchor as:
+ * <pre>
+ * <a href="foo.jsp?paramKey=paramValue>Go To Foo</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(_anchorCellModel.getParams(), name, value);
}
+ /**
+ * <p>
+ * Interanl method overriding the {@link AbstractHtmlTableCell#applyAttributes()} method
+ * to handle setting attributes on the {@link AnchorCellModel} associated with an instance of this tag.
+ * </p>
+ * @throws JspException when an error occurs applying attributes to the cell model.
+ */
protected void applyAttributes()
throws JspException {
super.applyAttributes();
@@ -508,6 +605,13 @@
}
}
+ /**
+ * Render the contents of the HTML anchor. 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) {
/* render any JavaScript needed to support framework features */
@@ -520,6 +624,11 @@
DECORATOR.decorate(getJspContext(), appender, _anchorCellModel);
}
+ /**
+ * Implementation of {@link AbstractHtmlTableCell#internalGetCellModel()} that exposes the {@link AnchorCellModel}
+ * which is storing state for the tag's anchor.
+ * @return this tag's anchor cell model
+ */
protected CellModel internalGetCellModel() {
return _anchorCellModel;
}
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=170271&r1=170270&r2=170271&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 15:11:30 2005
@@ -36,8 +36,39 @@
import org.apache.beehive.netui.util.Bundle;
/**
- * @jsptagref.tagdescription Renders a caption into a data grid
- * @netui:tag name="caption" body-content="scriptless" description="Renders a caption into a NetUI data grid"
+ * <p>
+ * The Caption tag is used to render an HTML <caption> inside of a data grid. The caption
+ * tag should be placed inside of a <netui-data:dataGrid> tag and will produce the
+ * caption for the HTML table that the dataGrid renders.
+ * </p>
+ * <p>
+ * To set HTML attributes on the rendered caption tag, use the attribute setters defined in this tag
+ * </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>
+ * </ul>
+ * </p>
+ * @jsptagref.tagdescription
+ * <p>
+ * The Caption tag is used to render an HTML <caption> inside of a data grid. The caption
+ * tag should be placed inside of a <netui-data:dataGrid> tag and will produce the
+ * caption for the HTML table that the dataGrid renders.
+ * </p>
+ * <p>
+ * To set HTML attributes on the rendered caption tag, use the attribute setters defined in this tag
+ * </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>
+ * </ul>
+ * </p>
+ * @netui:tag name="caption" body-content="scriptless"
+ * description="Renders the caption for the HTML table produced by the data grid tag"
*/
public class Caption
extends AbstractDataGridHtmlTag {
@@ -49,143 +80,132 @@
}
/**
- * Sets the onClick javascript event.
+ * Sets the onClick JavaScript event for the HTML attribute.
*
- * @param onClick - the onClick event.
- * @jsptagref.attributedescription The onClick JavaScript event.
- * @jsptagref.databindable false
+ * @param onClick the onClick event
+ * @jsptagref.attributedescription The onClick JavaScript event for the HTML caption.
* @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 caption."
*/
public void setOnClick(String onClick) {
_captionTag.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONCLICK, onClick);
}
/**
- * Sets the onDblClick javascript event.
+ * Sets the onDblClick JavaScript event for the HTML caption.
*
- * @param onDblClick - the onDblClick event.
- * @jsptagref.attributedescription The onDblClick JavaScript event.
- * @jsptagref.databindable false
+ * @param onDblClick the onDblClick event
+ * @jsptagref.attributedescription The onDblClick JavaScript event for the HTML caption.
* @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 caption."
*/
public void setOnDblClick(String onDblClick) {
_captionTag.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONDBLCLICK, onDblClick);
}
/**
- * Sets the onKeyDown javascript event.
+ * Sets the onKeyDown JavaScript event for the HTML caption.
*
- * @param onKeyDown - the onKeyDown event.
- * @jsptagref.attributedescription The onKeyDown JavaScript event.
- * @jsptagref.databindable false
+ * @param onKeyDown the onKeyDown event
+ * @jsptagref.attributedescription The onKeyDown JavaScript event for the HTML caption.
* @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 caption."
*/
public void setOnKeyDown(String onKeyDown) {
_captionTag.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONKEYDOWN, onKeyDown);
}
/**
- * Sets the onKeyUp javascript event.
+ * Sets the onKeyUp JavaScript event for the HTML caption.
*
- * @param onKeyUp - the onKeyUp event.
- * @jsptagref.attributedescription The onKeyUp JavaScript event.
- * @jsptagref.databindable false
+ * @param onKeyUp the onKeyUp event.
+ * @jsptagref.attributedescription The onKeyUp JavaScript event for the HTML caption.
* @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 caption."
*/
public void setOnKeyUp(String onKeyUp) {
_captionTag.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONKEYUP, onKeyUp);
}
/**
- * Sets the onKeyPress javascript event.
+ * Sets the onKeyPress JavaScript event for the HTML caption.
*
- * @param onKeyPress - the onKeyPress event.
- * @jsptagref.attributedescription The onKeyPress JavaScript event.
- * @jsptagref.databindable false
+ * @param onKeyPress the onKeyPress event.
+ * @jsptagref.attributedescription The onKeyPress JavaScript event for the HTML caption.
* @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 caption."
*/
public void setOnKeyPress(String onKeyPress) {
_captionTag.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONKEYPRESS, onKeyPress);
}
/**
- * Sets the onMouseDown javascript event.
+ * Sets the onMouseDown JavaScript event for the HTML caption.
*
- * @param onMouseDown - the onMouseDown event.
- * @jsptagref.attributedescription The onMouseDown JavaScript event.
- * @jsptagref.databindable false
+ * @param onMouseDown the onMouseDown event.
+ * @jsptagref.attributedescription The onMouseDown JavaScript event for the HTML caption.
* @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 caption."
*/
public void setOnMouseDown(String onMouseDown) {
_captionTag.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEDOWN, onMouseDown);
}
/**
- * Sets the onMouseUp javascript event.
+ * Sets the onMouseUp JavaScript event for the HTML caption.
*
- * @param onMouseUp - the onMouseUp event.
- * @jsptagref.attributedescription The onMouseUp JavaScript event.
- * @jsptagref.databindable false
+ * @param onMouseUp the onMouseUp event.
+ * @jsptagref.attributedescription The onMouseUp JavaScript event for the HTML caption.
* @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 caption."
*/
public void setOnMouseUp(String onMouseUp) {
_captionTag.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEUP, onMouseUp);
}
/**
- * Sets the onMouseMove javascript event.
+ * Sets the onMouseMove JavaScript event for the HTML caption.
*
- * @param onMouseMove - the onMouseMove event.
- * @jsptagref.attributedescription The onMouseMove JavaScript event.
- * @jsptagref.databindable false
+ * @param onMouseMove the onMouseMove event.
+ * @jsptagref.attributedescription The onMouseMove JavaScript event for the HTML caption.
* @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 caption."
*/
public void setOnMouseMove(String onMouseMove) {
_captionTag.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEMOVE, onMouseMove);
}
/**
- * Sets the onMouseOut javascript event.
+ * Sets the onMouseOut JavaScript event for the HTML caption.
*
- * @param onMouseOut - the onMouseOut event.
- * @jsptagref.attributedescription The onMouseOut JavaScript event.
- * @jsptagref.databindable false
+ * @param onMouseOut the onMouseOut event.
+ * @jsptagref.attributedescription The onMouseOut JavaScript event for the HTML caption.
* @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 caption."
*/
public void setOnMouseOut(String onMouseOut) {
_captionTag.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEOUT, onMouseOut);
}
/**
- * Sets the onMouseOver javascript event.
+ * Sets the onMouseOver JavaScript event for the HTML caption.
*
- * @param onMouseOver - the onMouseOver event.
- * @jsptagref.attributedescription The onMouseOver JavaScript event.
- * @jsptagref.databindable false
+ * @param onMouseOver the onMouseOver event.
+ * @jsptagref.attributedescription The onMouseOver JavaScript event for the HTML caption.
* @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 caption."
*/
public void setOnMouseOver(String onMouseOver) {
_captionTag.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEOVER, onMouseOver);
}
/**
- * Sets the style of the rendered html tag.
+ * Sets the style of the HTML caption.
*
- * @param style - the html style.
- * @jsptagref.attributedescription The style.
- * @jsptagref.databindable false
+ * @param style the caption attribute.
+ * @jsptagref.attributedescription The style of the HTML caption
* @jsptagref.attributesyntaxvalue <i>string_style</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The style."
+ * @netui:attribute required="false" rtexprvalue="true" description="The style of the HTML caption"
*/
public void setStyle(String style) {
if("".equals(style)) return;
@@ -194,13 +214,12 @@
}
/**
- * Sets the style class of the rendered html tag.
+ * Sets the style class of the HTML caption.
*
- * @param styleClass - the html style class.
- * @jsptagref.attributedescription The style class.
- * @jsptagref.databindable false
+ * @param styleClass the style class
+ * @jsptagref.attributedescription The style class of the HTML caption.
* @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 caption"
*/
public void setStyleClass(String styleClass) {
if("".equals(styleClass)) return;
@@ -209,52 +228,47 @@
}
/**
- * Sets the value of the title attribute.
+ * Sets the value of the title attribute for the HTML caption.
*
- * @param title
- * @jsptagref.attributedescription The title.
- * @jsptagref.databindable false
+ * @param title the title attribute
+ * @jsptagref.attributedescription The title attribute for the HTML caption
* @jsptagref.attributesyntaxvalue <i>string_title</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The title."
+ * @netui:attribute required="false" rtexprvalue="true" description="The title attribute for the HTML caption"
*/
public void setTitle(String title) {
_captionTag.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.TITLE, title);
}
/**
- * Sets the value of the language attribute.
+ * Sets the value of the language attribute for the HTML caption.
*
- * @param lang
- * @jsptagref.attributedescription The language.
- * @jsptagref.databindable true
+ * @param lang the language attribute
+ * @jsptagref.attributedescription The language attribute for the HTML caption
* @jsptagref.attributesyntaxvalue <i>string_lang</i>
- * @netui:attribute required="false" rtexprvalue="true" description="The cell's language"
- * @netui.tldx:attribute category="misc"
+ * @netui:attribute required="false" rtexprvalue="true" description="The language attribute for the HTML caption."
*/
public void setLang(String lang) {
_captionTag.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 caption.
*
- * @param dir
- * @jsptagref.attributedescription The text direction attribute.
- * @jsptagref.databindable true
+ * @param dir the dir attribute
+ * @jsptagref.attributedescription The text direction attribute for the caption
* @jsptagref.attributesyntaxvalue <i>string_dir</i>
* @netui:attribute required="false" rtexprvalue="true" description="The cell's text direction"
- * @netui.tldx:attribute category="misc"
*/
public void setDir(String dir) {
_captionTag.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.DIR, dir);
}
/**
- * Set the name of the tagId for the caption.
+ * Set the name of the tagId for the HTML caption. The page author is responsible for ensuring that the
+ * tagId value is unique within the current page scope.
*
- * @param tagId - the the name of the tagId for the caption.
+ * @param tagId the the name of the tagId for the caption.
* @jsptagref.attributedescription The tagId.
- * @jsptagref.databindable false
* @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. "
Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/ConfigurePager.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/ConfigurePager.java?rev=170271&r1=170270&r2=170271&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/ConfigurePager.java (original)
+++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/ConfigurePager.java Sun May 15 15:11:30 2005
@@ -33,7 +33,23 @@
import org.apache.beehive.netui.util.Bundle;
/**
- * @jsptagref.tagdescription Tag for configuring and rendering the pager in the NetUI data grid.
+ * <p>
+ * The configurePager tag is used to parameterize the data used to render a data grid's pager. This
+ * tag should be used inside of a <netui-data:dataGrid> tag. The tag supports adding a custom
+ * {@link PagerRenderer} via the {@link #setPagerRendererClass(String)}, overriding the default page
+ * size for a data grid via the {@link #setDefaultPageSize(Integer)} attribute, and setting
+ * the current data grid's page size via the {@link #setPageSize(int)} attribute. This tag produces
+ * no output and does not evaluate its body.
+ * </p>
+ * @jsptagref.tagdescription
+ * <p>
+ * The configurePager tag is used to parameterize the data used to render a data grid's pager. This
+ * tag should be used inside of a <netui-data:dataGrid> tag. The tag supports adding a custom
+ * {@link PagerRenderer} via the {@link #setPagerRendererClass(String)}, overriding the default page
+ * size for a data grid via the {@link #setDefaultPageSize(Integer)} attribute, and setting
+ * the current data grid's page size via the {@link #setPageSize(int)} attribute. This tag produces
+ * no output and does not evaluate its body.
+ * </p>
* @netui:tag name="configurePager" body-content="empty"
* description="Pager tag for the configuring and rendering the pager rendered in the NetUI data grid"
*/
@@ -57,77 +73,160 @@
}
/**
- * @jsptagref.attributedescription The maximum page size of data rendered by the NetUI data grid.
- * @jsptagref.databindable true
+ * Set the page size for the current data grid. This value is the maximum number of data rows
+ * that will be rendered by a data grid. When this value is set, it overides the
+ * {@link #setDefaultPageSize(Integer)} attribute. If this value is not set, the
+ * {@link #setDefaultPageSize(Integer)} is used to determine the maximum size of a data grid's
+ * page. Use this value when a data grid allows a user to vary the number of rows in a grid.
+ * @jsptagref.attributedescription
+ * Set the page size for the current data grid. This value is the maximum number of data rows
+ * that will be rendered by a data grid. When this value is set, it overides the
+ * {@link #setDefaultPageSize(Integer)} attribute. If this value is not set, the
+ * {@link #setDefaultPageSize(Integer)} is used to determine the maximum size of a data grid's
+ * page. Use this value when a data grid allows a user to vary the number of rows in a grid.
* @jsptagref.attributesyntaxvalue <i>int_pageSize</i>
* @netui:attribute required="false" rtexprvalue="true"
+ * description="Set the maximum number of rows to render for a data grid."
*/
public void setPageSize(int pageSize) {
_pageSize = new Integer(pageSize);
}
/**
- * @jsptagref.attributedescription The look and feel to render for the pager
- * @jsptagref.databindable true
+ * Set the appearance of the pager rendered by the data grid. This attribute allows the page author to
+ * choose from a set of pre-defined pager renderers which can be used to render paging UI
+ * in a data grid. The values include:
+ * <b>prevNext</b> which renders a pager as:<br/>
+ * <pre>
+ * Page # of # Previous Next
+ * </pre>
+ * where Previous and Next are anchors that can navigate to the previous and next pages. When
+ * there is no previous or next page, Previous or Next are displayed as literal text.
+ * <br/>
+ * <br/>
+ * <b>firstPrevNextLast</b> which renders a pager as:<br/>
+ * <pre>
+ * Page # of # First Previous Next Last
+ * </pre>
+ * where First, Previous, Next, and Last are anchors that can navigate to the first, previous, next, and last
+ * pages respectively. When the anchors would reference invalid pages, First, Previous, Nest, and Last
+ * are displayed as literal text.
+ * @jsptagref.attributedescription
+ * Set the style of the pager rendered by the data grid. This attribute allows the page author to
+ * choose from a set of pre-defined pager renderers which can be used to render paging UI
+ * in a data grid. The values include:
+ * <b>prevNext</b> which renders a pager as:<br/>
+ * <pre>
+ * Page # of # Previous Next
+ * </pre>
+ * where Previous and Next are anchors that can navigate to the previous and next pages. When
+ * there is no previous or next page, Previous or Next are displayed as literal text.
+ * <br/>
+ * <br/>
+ * <b>firstPrevNextLast</b> which renders a pager as:<br/>
+ * <pre>
+ * Page # of # First Previous Next Last
+ * </pre>
+ * where First, Previous, Next, and Last are anchors that can navigate to the first, previous, next, and last
+ * pages respectively. When the anchors would reference invalid pages, First, Previous, Nest, and Last
+ * are displayed as literal text.
* @jsptagref.attributesyntaxvalue <i>String_pagerStyle</i>
* @netui:attribute required="false" rtexprvalue="true"
+ * description="Set the appearance of the pager rendered by the data grid.
*/
public void setPagerFormat(String pagerFormat) {
_pagerFormat = pagerFormat;
}
/**
- * @jsptagref.attributedescription The URI to access when paging occurs.
- * @jsptagref.databindable true
+ * Set the HREF used to perform paging. When a pager renders anchors for navigating the data set
+ * inside of the data grid, this HREF when set is used as the request URI to perform the paging.
+ * Only one of this and the {@link #setPageAction(String)} may be set.
+ * @jsptagref.attributedescription
+ * Set the HREF used to perform paging. When a pager renders anchors for navigating the data set
+ * inside of the data grid, this HREF when set is used as the request URI to perform the paging.
+ * Only one of this and the {@link #setPageAction(String)} may be set.
* @jsptagref.attributesyntaxvalue <i>String_pageUri</i>
- * @netui:attribute required="false" rtexprvalue="true"
+ * @netui:attribute required="false" rtexprvalue="true" description="The HREF used when building HTML
+ * anchors that perform paging."
*/
public void setPageHref(String pageHref) {
_pageHref = pageHref;
}
/**
- * @jsptagref.attributedescription Sets the action that handles links clicked in the pager.
- * @jsptagref.databindable true
+ * Set the action used to perform paging. When a pager renders anchors for navigating the
+ * data set in a data grid, this action is used as the request URI to perform the paging.
+ * Only one of this and the {@link #setPageHref(String)} may be set.
+ * @jsptagref.attributedescription
+ * Set the action used to perform paging. When a pager renders anchors for navigating the
+ * data set in a data grid, this action is used as the request URI to perform the paging.
+ * Only one of this and the {@link #setPageHref(String)} may be set.
* @jsptagref.attributesyntaxvalue <i>String_pageAction</i>
* @netui:attribute required="false" rtexprvalue="true"
+ * description="The action used when building HTML anchors that perrform paging.
*/
public void setPageAction(String pageAction) {
_pageAction = pageAction;
}
/**
- * @jsptagref.attributedescription Boolean. Enables/disables the default pager rendered in the data grid
- * @jsptagref.databindable true
+ * Sets the value of an attribute that enables or disables rendering the data grid's default pager.
+ * When this value is set to <code>false</code>, the data grid will not render its pager and rendering
+ * is left to the page author. When rendering is disabled, a pager can be rendered using the
+ * {@link RenderPager} tag or manually in a page.
+ * @jsptagref.attributedescription
+ * Sets the value of an attribute that enables or disables rendering the data grid's default pager.
+ * When this value is set to <code>false</code>, the data grid will not render its pager and rendering
+ * is left to the page author. When rendering is disabled, a pager can be rendered using the
+ * {@link RenderPager} tag or manually in a page.
* @jsptagref.attributesyntaxvalue <i>boolean</i>
* @netui:attribute required="false" rtexprvalue="true"
+ * description="Boolean that enables / disables a data grid rendering the pager in its default location"
*/
public void setDisableDefaultPager(boolean disableDefaultPager) {
_disableDefaultPager = Boolean.valueOf(disableDefaultPager);
}
/**
- * @jsptagref.attributedescription Sets the class that renders the pager.
- * @jsptagref.databindable true
+ * Set a Java class name to create a {@link PagerRenderer} used to render a data grid's pager. The
+ * class referenced by this name must extend the {@link PagerRenderer} base class.
+ * @jsptagref.attributedescription
+ * Set a Java class name to create a {@link PagerRenderer} used to render a data grid's pager. The
+ * class referenced by this name must extend the {@link PagerRenderer} base class.
* @jsptagref.attributesyntaxvalue <i>string</i>
* @netui:attribute required="false" rtexprvalue="true"
+ * description="The data grid pager's custom pager render classname"
*/
public void setPagerRendererClass(String pagerRendererClass) {
_pagerRendererClass = pagerRendererClass;
}
/**
- * @jsptagref.attributedescription Sets the class that renders the pager.
- * @jsptagref.databindable true
+ * Set the default page size for the data grid. The grid has a default page size that is used
+ * when no other page size is specified; this value is {@link PagerModel#DEFAULT_PAGE_SIZE}.
+ * This value overrides that default so that the normal rendering of such a data grid is
+ * change in the absence of an override provided by the {@link #setPageSize(int)} attribute.
+ *
+ * @jsptagref.attributedescription
+ * Set the default page size for the data grid. The grid has a default page size that is used
+ * when no other page size is specified; this value is {@link PagerModel#DEFAULT_PAGE_SIZE}.
+ * This value overrides that default so that the normal rendering of such a data grid is
+ * change in the absence of an override provided by the {@link #setPageSize(int)} attribute.
* @jsptagref.attributesyntaxvalue <i>string</i>
- * @netui:attribute required="false" rtexprvalue="true"
+ * @netui:attribute required="false" rtexprvalue="true" description="The data grid pager's default page size"
*/
public void setDefaultPageSize(Integer defaultPageSize) {
_defaultPageSize = defaultPageSize;
}
+ /**
+ * Execute the ConfigurePager tag. When the ConfigurePager tag runs, it applies its tag attributes
+ * onto a {@link DataGridTagModel} state object which is used when the data grid renders its pager.
+ * @throws JspException when errors occur when processing this tag's attribute values
+ */
public void doTag()
- throws JspException {
+ throws JspException {
DataGridTagModel dgm = DataGridUtil.getDataGridTagModel(getJspContext());
if(dgm == null)
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=170271&r1=170270&r2=170271&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 15:11:30 2005
@@ -147,9 +147,9 @@
}
/**
- * Sets the onClick javascript event.
+ * Sets the onClick JavaScript event.
*
- * @param onClick - the onClick event.
+ * @param onClick the onClick event.
* @jsptagref.attributedescription The onClick JavaScript event.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_onClick</i>
@@ -160,9 +160,9 @@
}
/**
- * Sets the onDblClick javascript event.
+ * Sets the onDblClick JavaScript event.
*
- * @param onDblClick - the onDblClick event.
+ * @param onDblClick the onDblClick event.
* @jsptagref.attributedescription The onDblClick JavaScript event.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_onDblClick</i>
@@ -173,9 +173,9 @@
}
/**
- * Sets the onKeyDown javascript event.
+ * Sets the onKeyDown JavaScript event.
*
- * @param onKeyDown - the onKeyDown event.
+ * @param onKeyDown the onKeyDown event.
* @jsptagref.attributedescription The onKeyDown JavaScript event.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_onKeyDown</i>
@@ -186,9 +186,9 @@
}
/**
- * Sets the onKeyUp javascript event.
+ * Sets the onKeyUp JavaScript event.
*
- * @param onKeyUp - the onKeyUp event.
+ * @param onKeyUp the onKeyUp event.
* @jsptagref.attributedescription The onKeyUp JavaScript event.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_onKeyUp</i>
@@ -199,9 +199,9 @@
}
/**
- * Sets the onKeyPress javascript event.
+ * Sets the onKeyPress JavaScript event.
*
- * @param onKeyPress - the onKeyPress event.
+ * @param onKeyPress the onKeyPress event.
* @jsptagref.attributedescription The onKeyPress JavaScript event.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_onKeyPress</i>
@@ -212,9 +212,9 @@
}
/**
- * Sets the onMouseDown javascript event.
+ * Sets the onMouseDown JavaScript event.
*
- * @param onMouseDown - the onMouseDown event.
+ * @param onMouseDown the onMouseDown event.
* @jsptagref.attributedescription The onMouseDown JavaScript event.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_onMouseDown</i>
@@ -225,9 +225,9 @@
}
/**
- * Sets the onMouseUp javascript event.
+ * Sets the onMouseUp JavaScript event.
*
- * @param onMouseUp - the onMouseUp event.
+ * @param onMouseUp the onMouseUp event.
* @jsptagref.attributedescription The onMouseUp JavaScript event.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_onMouseUp</i>
@@ -238,9 +238,9 @@
}
/**
- * Sets the onMouseMove javascript event.
+ * Sets the onMouseMove JavaScript event.
*
- * @param onMouseMove - the onMouseMove event.
+ * @param onMouseMove the onMouseMove event.
* @jsptagref.attributedescription The onMouseMove JavaScript event.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_onMouseMove</i>
@@ -251,9 +251,9 @@
}
/**
- * Sets the onMouseOut javascript event.
+ * Sets the onMouseOut JavaScript event.
*
- * @param onMouseOut - the onMouseOut event.
+ * @param onMouseOut the onMouseOut event.
* @jsptagref.attributedescription The onMouseOut JavaScript event.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_onMouseOut</i>
@@ -264,9 +264,9 @@
}
/**
- * Sets the onMouseOver javascript event.
+ * Sets the onMouseOver JavaScript event.
*
- * @param onMouseOver - the onMouseOver event.
+ * @param onMouseOver the onMouseOver event.
* @jsptagref.attributedescription The onMouseOver JavaScript event.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_onMouseOver</i>
@@ -279,7 +279,7 @@
/**
* Sets the style of the rendered html tag.
*
- * @param style - the html style.
+ * @param style the html style.
* @jsptagref.attributedescription The style.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_style</i>
@@ -294,7 +294,7 @@
/**
* Sets the style class of the rendered html tag.
*
- * @param styleClass - the html style class.
+ * @param styleClass the html style class.
* @jsptagref.attributedescription The style class.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_style_class</i>
@@ -441,7 +441,7 @@
/**
* Set the name of the tagId for the table tag.
*
- * @param tagId - the the name of the tagId for the table tag.
+ * @param tagId the the name of the tagId for the table tag.
* @jsptagref.attributedescription The tagId.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>string_tagId</i>
Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/DataGridUtil.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/DataGridUtil.java?rev=170271&r1=170270&r2=170271&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/DataGridUtil.java (original)
+++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/DataGridUtil.java Sun May 15 15:11:30 2005
@@ -23,7 +23,8 @@
import org.apache.beehive.netui.databinding.datagrid.api.rendering.CellModel;
/**
- *
+ * Package protected class that provides utility methods for managing adding and removing
+ * {@link DataGridTagModel} and {@link CellModel} instances in the {@link JspContext}.
*/
final class DataGridUtil {
@@ -33,30 +34,62 @@
/* do not construct */
private DataGridUtil() {}
+ /**
+ * Get the {@link DataGridTagModel} instance from the {@link JspContext} using the
+ * {@link #KEY_GRID_MODEL} as the key.
+ * @param jspContext the jsp context
+ * @return the {@link DataGridTagModel} if one is found
+ */
public static final DataGridTagModel getDataGridTagModel(JspContext jspContext) {
Object model = jspContext.getAttribute(KEY_GRID_MODEL);
assert model != null ? model instanceof DataGridTagModel : true;
return (DataGridTagModel)model;
}
+ /**
+ * Put the {@link DataGridTagModel} in the {@link JspContext} using the {@link #KEY_GRID_MODEL}
+ * as the key.
+ * @param jspContext the jsp context
+ * @param dataGridTagModel the {@link DataGridTagModel}
+ */
public static final void putDataGridTagModel(JspContext jspContext, DataGridTagModel dataGridTagModel) {
jspContext.setAttribute(KEY_GRID_MODEL, dataGridTagModel);
}
+ /**
+ * Remove a {@link DataGridTagModel} from the {@link JspContext}
+ * @param jspContext the jsp context
+ */
public static final void removeDataGridTagModel(JspContext jspContext) {
jspContext.removeAttribute(KEY_GRID_MODEL);
}
+ /**
+ * Get the {@link CellModel} instance from the {@link JspContext} using the
+ * {@link #KEY_CELL_MODEL} as the key.
+ * @param jspContext the jsp context
+ * @return the {@link CellModel} if one is found
+ */
public static final CellModel getCellModel(JspContext jspContext) {
Object model = jspContext.getAttribute(KEY_CELL_MODEL);
assert model != null ? model instanceof CellModel : true;
return (CellModel)model;
}
+ /**
+ * Put the {@link CellModel} in the {@link JspContext} using the {@link #KEY_CELL_MODEL}
+ * as the key.
+ * @param jspContext the jsp context
+ * @param cellModel the {@link CellModel}
+ */
public static final void putCellModel(JspContext jspContext, CellModel cellModel) {
jspContext.setAttribute(KEY_CELL_MODEL, cellModel);
}
+ /**
+ * Remove a {@link CellModel} from the {@link JspContext}
+ * @param jspContext the jsp context
+ */
public static final void removeCellModel(JspContext jspContext) {
jspContext.removeAttribute(KEY_CELL_MODEL);
}