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/19 21:28:45 UTC

svn commit: r170981 [3/3] - in /incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding: bundle/ cellrepeater/ datagrid/ invoke/ message/ pageinput/ repeater/ repeater/pad/ script/ xml/

Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/repeater/RepeaterHeader.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/repeater/RepeaterHeader.java?rev=170981&r1=170980&r2=170981&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/repeater/RepeaterHeader.java (original)
+++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/repeater/RepeaterHeader.java Thu May 19 12:28:44 2005
@@ -18,33 +18,78 @@
 package org.apache.beehive.netui.tags.databinding.repeater;
 
 /**
- * This tag is used to render the header of a {@link Repeater}.  This header may contain
- * any markup or tags that can be rendered to a page.  In the case of starting a
- * table, ordered list, or unordered list, the HTML elements <table>, <ol>,
- * and <ul> could respectively be rendered inside the body of this tag.
- * There is no data item present at the time that the RepeaterHeader renders, so tags in the
- * body can not reference the <code>container</code> databinding context to access
- * a current item or index, though other databinding contexts are available.
- * <p>The RepeaterHeader renders exactly once in a table during the {@link Repeater}
- * tag's {@link Repeater#HEADER} rendering state.</p>
- *
- * @jsptagref.tagdescription Renders the header of a {@link Repeater} tag.
- * This header may contain
- * any any HTML markup that can be rendered to a page.  In the case of starting a
- * table, ordered list, or unordered list, the HTML elements &lt;table&gt;, &lt;ol&gt;,
- * and &lt;ul&gt; could respectively be rendered inside the body of this tag.
+ * <p>
+ * Renders the header of a {@link Repeater} tag. This header may contain any any HTML markup that
+ * can be rendered to a page.  In the case of starting a table, ordered list, or unordered list,
+ * the HTML elements &lt;table&gt;, &lt;ol&gt;, and &lt;ul&gt; could respectively be rendered inside
+ * the body of this tag.
+ * </p>
+ * <p>
+ * There is no data item present at the time that the &lt;netui-data:repeaterHeader> renders (because
+ * the iteration of the &lt;netui-data:repeater> tag has not yet begun), so tags in the body can not
+ * reference the <code>${container...}</code> JSP EL implicit object to access the current item in
+ * the data set, though other databinding contexts are available.
+ * </p>
+ * <p>
+ * The footer tag is rendered exactly once at the beginning of repeater rendering.
+ * </p>
+ * <p>
+ * For example, the following sample renders the data set as an HTML table.  The table has two columns, "index" and "name",
+ * and each iteration over the data set is rendered a row of the table.  The &lt;netui-data:repeaterHeader>
+ * tag renders once, before the iteration has begun.  It renders an opening HTML table tag and
+ * two header rows for the table.
  * <p/>
- * <p>There is no data item present at the time that the &lt;netui-data:repeaterHeader> renders
- * (because the iteration of
- * the &lt;netui-data:repeater> tag has not yet begun), so tags in the
- * body can not reference the <code>{container...}</code> data binding context to access
- * the current item in the data set, though other databinding contexts are available.
- * @example The following sample renders the data set as an HTML table.  The table has two columns, "index" and "name",
+ * <pre>
+ *    &lt;netui-data:repeater dataSource="pageFlow.myDataSet">
+ *        <b>&lt;netui-data:repeaterHeader></b>
+ *            &lt;table border="1">
+ *                &lt;tr>
+ *                    &lt;td>&lt;b>index&lt;/b>&lt;/td>
+ *                    &lt;td>&lt;b>name&lt;/b>&lt;/td>
+ *                &lt;/tr>
+ *        <b>&lt;/netui-data:repeaterHeader></b>
+ *        &lt;netui-data:repeaterItem>
+ *            &lt;tr>
+ *                &lt;td>
+ *                    &lt;netui:span value="${container.index}" />
+ *                &lt;/td>
+ *                &lt;td>
+ *                    &lt;netui:span value="${container.item}" />
+ *                &lt;/td>
+ *            &lt;/tr>
+ *        &lt;/netui-data:repeaterItem>
+ *        &lt;netui-data:repeaterFooter>
+ *            &lt;/table>
+ *        &lt;/netui-data:repeaterFooter>
+ *    &lt;/netui-data:repeater>
+ * </pre>
+ * </p>
+ *
+ * @jsptagref.tagdescription
+ * <p>
+ * Renders the header of a {@link Repeater} tag. This header may contain any any HTML markup that
+ * can be rendered to a page.  In the case of starting a table, ordered list, or unordered list,
+ * the HTML elements &lt;table&gt;, &lt;ol&gt;, and &lt;ul&gt; could respectively be rendered inside
+ * the body of this tag.
+ * </p>
+ * <p>
+ * There is no data item present at the time that the &lt;netui-data:repeaterHeader> renders (because
+ * the iteration of the &lt;netui-data:repeater> tag has not yet begun), so tags in the body can not
+ * reference the <code>${container...}</code> JSP EL implicit object to access the current item in
+ * the data set, though other databinding contexts are available.
+ * </p>
+ * <p>
+ * The footer tag is rendered exactly once at the beginning of repeater rendering.
+ * </p>
+ * @example
+ * <p>
+ * For example, the following sample renders the data set as an HTML table.  The table has two columns, "index" and "name",
  * and each iteration over the data set is rendered a row of the table.  The &lt;netui-data:repeaterHeader>
  * tag renders once, before the iteration has begun.  It renders an opening HTML table tag and
  * two header rows for the table.
  * <p/>
- * <pre>    &lt;netui-data:repeater dataSource="pageFlow.myDataSet">
+ * <pre>
+ *    &lt;netui-data:repeater dataSource="pageFlow.myDataSet">
  *        <b>&lt;netui-data:repeaterHeader></b>
  *            &lt;table border="1">
  *                &lt;tr>
@@ -65,8 +110,10 @@
  *        &lt;netui-data:repeaterFooter>
  *            &lt;/table>
  *        &lt;/netui-data:repeaterFooter>
- *    &lt;/netui-data:repeater></pre>
- * @netui:tag name="repeaterHeader" description="Use this tag to render the header of a Repeater."
+ *    &lt;/netui-data:repeater>
+ * </pre>
+ * </p>
+ * @netui:tag name="repeaterHeader" description="Render the header of the repeater."
  */
 public class RepeaterHeader
         extends RepeaterComponent {

Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/repeater/RepeaterItem.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/repeater/RepeaterItem.java?rev=170981&r1=170980&r2=170981&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/repeater/RepeaterItem.java (original)
+++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/repeater/RepeaterItem.java Thu May 19 12:28:44 2005
@@ -18,27 +18,62 @@
 package org.apache.beehive.netui.tags.databinding.repeater;
 
 /**
- * This tag is used to render each item in the data set.  The items in the data set are
- * provided by this tag's Repeater parent and are available for databinding using the
- * <code>container</code> databinding context.  The current item is referenced
- * using the <code>container.item</code> expression.
- * <p>The RepeaterItem tag can only be uesd when directly contained by a Repeater tag, and
- * a RepeaterItem is rendered during the Repeater's {@link Repeater#ITEM} rendering state.</p>
- * <p>By default, the RepeaterItem simply renders its body once for each of the items in the
- * Repeater tag's data set.</p>
+ * <p>
+ * This tag is used to render an individual item in the data set as it is iterated over by
+ * the {@link Repeater} tag.  As an individual item is being iterated over, it is available using the
+ * <code>${container.item}</code> JSP EL expression. The &lt;netui-data:repeaterItem> tag can only be
+ * uesd when directly contained by a &lt;netui-data:repeater> tag.
+ * </p>
+ * <p>
+ * By default, the &lt;netui-data:repeaterItem> renders its body exactly once for each of the items in the
+ * &lt;netui-data:repeater> tag's data set.
+ * </p>
+ * For example, the following sample renders the data set as an HTML table.  The &lt;netui-data:repeaterItem> tag
+ * renders a new row in the table for each item in the data set.
+ * </p>
+ * <pre>
+ *    &lt;netui-data:repeater dataSource="pageFlow.myDataSet">
+ *        &lt;netui-data:repeaterHeader>
+ *            &lt;table border="1">
+ *                &lt;tr>
+ *                    &lt;td>&lt;b>index&lt;/b>&lt;/td>
+ *                    &lt;td>&lt;b>name&lt;/b>&lt;/td>
+ *                &lt;/tr>
+ *        &lt;/netui-data:repeaterHeader>
+ *        <b>&lt;netui-data:repeaterItem></b>
+ *            &lt;tr>
+ *                &lt;td>
+ *                    &lt;netui:span value="${container.index}" />
+ *                &lt;/td>
+ *                &lt;td>
+ *                    &lt;netui:span value="${container.item}" />
+ *                &lt;/td>
+ *            &lt;/tr>
+ *        <b>&lt;/netui-data:repeaterItem></b>
+ *        &lt;netui-data:repeaterFooter>
+ *            &lt;/table>
+ *        &lt;/netui-data:repeaterFooter>
+ *    &lt;/netui-data:repeater>
+ * </pre>
+ * </p>
  *
- * @jsptagref.tagdescription This tag is used to render an individual item in the data set as it is iterated over by
- * the {@link Repeater} tag.
- * As an individual item is being iterated over, it is available using the
- * <code>${container.item}</code> databinding expression.
- * <p>The &lt;netui-data:repeaterItem> tag can only be uesd when directly contained by
- * a &lt;netui-data:repeater> tag.</p>
- * <p>By default, the &lt;netui-data:repeaterItem> simply renders its body once for each of the items in the
- * &lt;netui-data:repeater> tag's data set.</p>
- * @example The following sample renders the data set as an HTML table.  The &lt;netui-data:repeaterItem> tag
+ * @jsptagref.tagdescription
+ * <p>
+ * This tag is used to render an individual item in the data set as it is iterated over by
+ * the {@link Repeater} tag.  As an individual item is being iterated over, it is available using the
+ * <code>${container.item}</code> JSP EL expression. The &lt;netui-data:repeaterItem> tag can only be
+ * uesd when directly contained by a &lt;netui-data:repeater> tag.
+ * </p>
+ * <p>
+ * By default, the &lt;netui-data:repeaterItem> renders its body exactly once for each of the items in the
+ * &lt;netui-data:repeater> tag's data set.
+ * </p>
+ * @example
+ * For example, the following sample renders the data set as an HTML table.  The &lt;netui-data:repeaterItem> tag
  * renders a new row in the table for each item in the data set.
- * <p/>
- * <pre>    &lt;netui-data:repeater dataSource="pageFlow.myDataSet">
+ * </p>
+ * <pre>
+ *    &lt;netui-data:repeater dataSource="pageFlow.myDataSet">
  *        &lt;netui-data:repeaterHeader>
  *            &lt;table border="1">
  *                &lt;tr>
@@ -59,16 +94,16 @@
  *        &lt;netui-data:repeaterFooter>
  *            &lt;/table>
  *        &lt;/netui-data:repeaterFooter>
- *    &lt;/netui-data:repeater></pre>
- * @netui:tag name="repeaterItem" description="Use this tag to render each item in the data set."
+ *    &lt;/netui-data:repeater>
+ * </pre>
+ * </p>
+ * @netui:tag name="repeaterItem" description="Render each data item in the data set rendered by the repeater"
  */
 public class RepeaterItem
-        extends RepeaterComponent {
+    extends RepeaterComponent {
 
     /**
-     * Get the name of this tag.  This is used to identify the type of this tag
-     * for reporting tag errors.
-     *
+     * Get the name of this tag.  This is used to identify the type of this tag for reporting tag errors.
      * @return a constant String representing the name of this tag.
      */
     public String getTagName() {

Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/repeater/pad/Pad.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/repeater/pad/Pad.java?rev=170981&r1=170980&r2=170981&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/repeater/pad/Pad.java (original)
+++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/repeater/pad/Pad.java Thu May 19 12:28:44 2005
@@ -24,50 +24,73 @@
 import org.apache.beehive.netui.util.logging.Logger;
 
 /**
- * <p/>
- * A tag that affects the number of items that are rendered in a
- * {@link org.apache.beehive.netui.tags.databinding.repeater.Repeater}.
- * The Pad tag has the ability to turn an irregular data set in the
- * {@link org.apache.beehive.netui.tags.databinding.repeater.Repeater}
- * into a regular dataset through the use of the three attributes on the Pad tag.  The Pad tag can
- * truncate the rendering of a data set if enough items have been rendered or can
- * pad a default item text onto the end of a data set that is not big enough.  If the padText attribute
- * is unset, the body of the Pad tag is used as the padText.
- * </p>
- * <p/>
- * Note, the <code>container</code> data binding context should not be used inside
- * of the Pad's <code>padText</code> attribute as binding to both the <code>item</code>
- * and <code>index</code> could product unexpected results.
+ * Sets the number of items rendered by a {@link org.apache.beehive.netui.tags.databinding.repeater.Repeater} tag.
+ * The &lt;netui-data:pad> tag has the ability to turn an irregular data set in the &lt;netui-data:repeater> tag
+ * into a regular data set through the use of the three attributes:
+ * <blockquote>
+ * <ul>
+ * <li><code>maxRepeat</code> - truncates the rendering of the data set</li>
+ * <li><code>minRepeat</code> - forces the &lt;netui-data:repeater> to render
+ * a minimum number of elements</li>
+ * <li><code>padText</code> - default text to render if the data set does not have the
+ * minimum number of elements</li>
+ * </ul>
+ * </blockquote>
+ * If the <code>padText</code> attribute is unset, the body of the &lt;netui-data:pad> tag is used as the default text.
+ * </p>
+ * <p>
+ * Note, the <code>container</code> data binding context should not be used inside of the Pad's <code>padText</code>
+ * attribute as binding to both the <code>item</code> and <code>index</code> could product unexpected results.
+ * </p>
+ * <p>
+ * In the following example, assume that the &lt;netui-data:repeater> tag iterates over a {@link java.util.List} object.
+ * The &lt;netui-data:pad> limits the iteration to three cycles, no matter how many elements are actually in the List.
+ * <pre>
+ *     &lt;netui-data:repeater dataSource="pageFlow.myList">
+ *         &lt;netui-data:pad maxRepeat="3"/>
+ *             &lt;netui-data:repeaterItem>
+ *                 &lt;netui:span value="${container.item}" />
+ *             &lt;/netui-data:repeaterItem>
+ *     &lt;/netui-data:repeater>
+ * </pre>
  * </p>
  *
  * @jsptagref.tagdescription <p>
- * Sets the number of items rendered by a
- * {@link org.apache.beehive.netui.tags.databinding.repeater.Repeater} tag.
- * The &lt;netui-data:pad> tag has the ability to turn an irregular data set in the
- * &lt;netui-data:repeater> tag
+ * Sets the number of items rendered by a {@link org.apache.beehive.netui.tags.databinding.repeater.Repeater} tag.
+ * The &lt;netui-data:pad> tag has the ability to turn an irregular data set in the &lt;netui-data:repeater> tag
  * into a regular data set through the use of the three attributes:
  * <blockquote>
  * <ul>
  * <li><code>maxRepeat</code> - truncates the rendering of the data set</li>
  * <li><code>minRepeat</code> - forces the &lt;netui-data:repeater> to render
  * a minimum number of elements</li>
- * <li><code>padText - default text to render if the data set does not have the
- * minimum number of elements</code></li>
+ * <li><code>padText</code> - default text to render if the data set does not have the
+ * minimum number of elements</li>
  * </ul>
  * </blockquote>
- * <p/>
- * <p>If the <code>padText</code> attribute
- * is unset, the body of the &lt;netui-data:pad> tag is used as the default text.
- * @example In the following example, assume that the &lt;netui-data:repeater> tag iterates over
- * a {@link java.util.List java.util.List} object.  The &lt;netui-data:pad> limits the iteration
- * to three cycles, no matter how many elements are actually in the List.
- * <pre>    &lt;netui-data:repeater dataSource="pageFlow.myList">
+ * If the <code>padText</code> attribute is unset, the body of the &lt;netui-data:pad> tag is used as the default text.
+ * </p>
+ * <p>
+ * Note, the <code>container</code> data binding context should not be used inside of the Pad's <code>padText</code>
+ * attribute as binding to both the <code>item</code> and <code>index</code> could product unexpected results.
+ * </p>
+ *
+ * @example
+ * <p>
+ * In the following example, assume that the &lt;netui-data:repeater> tag iterates over a {@link java.util.List} object.
+ * The &lt;netui-data:pad> limits the iteration to three cycles, no matter how many elements are actually in the List.
+ * <pre>
+ *     &lt;netui-data:repeater dataSource="pageFlow.myList">
  *         &lt;netui-data:pad maxRepeat="3"/>
  *             &lt;netui-data:repeaterItem>
  *                 &lt;netui:span value="${container.item}" />
  *             &lt;/netui-data:repeaterItem>
- *     &lt;/netui-data:repeater></pre>
- * @netui:tag name="pad" description="Affects the number of items that are rendered in a Repeater."
+ *     &lt;/netui-data:repeater>
+ * </pre>
+ * </p>
+ *
+ * @netui:tag name="pad"
+ *            description="Repeater tag set tag that can pad an irregularly side data set in order to force the repeater to render a regular number of rows"
  */
 public class Pad
     extends RepeaterComponent {
@@ -89,12 +112,13 @@
     }
 
     /**
-     * Set the text that will be used when padding a Repeater that
-     * renders its body too few times.
+     * Set the text that will be used when padding a {@link org.apache.beehive.netui.tags.databinding.repeater.Repeater}
+     * that renders its body too few times.
      *
      * @param padText the text that is used to pad a repeater's content
-     * @jsptagref.attributedescription The text will be used when padding a &lt;netui-data:repeater> that renders too few times
-     * @jsptagref.databindable true
+     * @jsptagref.attributedescription
+     * Set the text that will be used when padding a {@link org.apache.beehive.netui.tags.databinding.repeater.Repeater}
+     * that renders its body too few times.
      * @jsptagref.attributesyntaxvalue <i>string_padText</i>
      * @netui:attribute required="false" rtexprvalue="true"
      */
@@ -103,18 +127,15 @@
     }
 
     /**
-     * Set the maximum number of items that will be rendered by a Repeater.
-     * If the size of the data set is greater than this, only this many
-     * items will be rendered.  This value can be a String of an integer
-     * or can be an expression that references an integer.
+     * Set the maximum number of items that will be rendered by a &lt;netui-data:repeater> tag.  If the size
+     * of the data set is greater than this, only this many items will be rendered.  This value can be an integer
+     * or can be an expression that resolves to an integer.
      *
-     * @param maxRepeat an integer or an expression that references an integer
-     *                  for the maximum number of items to render
-     * @jsptagref.attributedescription Set the maximum number of items that will be rendered by a &lt;netui-data:repeater> tag.
-     * If the size of the data set is greater than this, only this many
-     * items will be rendered.  This value can be an integer
+     * @param maxRepeat an integer or an expression that references an integer for the maximum number of items to render
+     * @jsptagref.attributedescription
+     * Set the maximum number of items that will be rendered by a &lt;netui-data:repeater> tag.  If the size
+     * of the data set is greater than this, only this many items will be rendered.  This value can be an integer
      * or can be an expression that resolves to an integer.
-     * @jsptagref.databindable true
      * @jsptagref.attributesyntaxvalue <i>integer_or_expression_maxRepeat</i>
      * @netui:attribute required="false" rtexprvalue="true"
      */
@@ -123,17 +144,12 @@
     }
 
     /**
-     * Set the minimum number of items that will be rendered by a Repeater.
-     * If the size of the data set is smaller than this, the data set will
-     * be padded with value of the pad text attribute.
      *
-     * @param minRepeat an integer or an expression that references
-     *                  an integer for the minimum number of items to render
-     * @jsptagref.attributedescription Set the minimum number of items that will be rendered by a &lt;netui-data:repeater> tag.
-     * If the size of the data set is smaller than this, the data set will
-     * be padded with the value of the <code>padText</code> attribute. This value can be an integer
-     * or can be an expression that resolves to an integer.
-     * @jsptagref.databindable true
+     * @param minRepeat an integer or an expression that references an integer for the minimum number of items to render
+     * @jsptagref.attributedescription
+     * Set the minimum number of items that will be rendered by a &lt;netui-data:repeater> tag.  If the size of
+     * the data set is smaller than this, the data set will be padded with the value of the <code>padText</code>
+     * attribute. This value can be an integer or can be an expression that resolves to an integer.
      * @jsptagref.attributesyntaxvalue <i>integer_or_expression_minRepeat</i>
      * @netui:attribute required="false" rtexprvalue="true"
      */

Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/script/GetData.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/script/GetData.java?rev=170981&r1=170980&r2=170981&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/script/GetData.java (original)
+++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/script/GetData.java Thu May 19 12:28:44 2005
@@ -23,47 +23,102 @@
 import org.apache.beehive.netui.util.logging.Logger;
 
 /**
+ * <p>
+ * This tag evaluates an expression and places the result in the
+ * {@link javax.servlet.jsp.PageContext} object, where the data is available to the JSP EL and JSP scriptlet.
+ * This tag can be used to extract data from forms, Controller files, and any data binding context and
+ * make it available to scriptlets.
+ * </p>
+ * <p>
+ * In the following example, the getData tag gets the value of a property in the page flow and
+ * makes it available to the JSP via the JSP EL implicit object <code>${pageScope}</code>.
+ * <pre>
+ *     &lt;netui-data:getData resultId="myData" value="${pageFlow.myData}"/>
+ * </pre>
+ * <p>
+ * The following scriptlet extracts the data from the <code>PageContext</code> object and writes it to
+ * the rendered HTML: <br/>
+ * <pre>
+ *     ${pageScope.myData}
+ * </pre>
+ * </p>
+ * In this first example, the &lt;netui-data:getData> tag loads data into the {@link javax.servlet.jsp.PageContext}'s
+ * attribute map.  It can then be accessed using the {@link javax.servlet.jsp.PageContext#getAttribute(String)} method.
+ * <pre>
+ *     &lt;netui:form action="lastNameAction" focus="lastname"&gt;
+ *         ...
+ *         &lt;netui-data:getData resultId="first" value="${actionForm.firstname}"/&gt;
+ *         ...
+ *         &lt;%
+ *             String firstName = (String)pageContext.getAttribute("first");
+ *             System.out.println("First Name = " + firstName);
+ *             ...
+ *         %&gt;
+ *         ...
+ *     &lt;/netui:form&gt;</pre>
  * <p/>
- * This tag evaluates an expression and places the result of expression evaluation
- * in a JSP's <code>PageContext</code>.  This can be used to extract objects from forms,
- * page flows, and other objects that can be databound; once in the JSP,
- * scriptlet can be written using these objects by accessing them through the
- * {@link javax.servlet.jsp.PageContext#getAttribute} method.
+ * <p>
+ * This example shows how to use &lt;netui-data:getData&gt; and the <code>PageContext</code> inside of other
+ * containers, in this case a &lt;netui-data:repeater> tag. The &lt;netui-data:getData> below extracts each
+ * element as the &lt;netui-data:repeater> iterates over the data set and writes it to the Java console:
+ * <br/>
+ * <pre>    &lt;netui-data:repeater dataSource="pageFlow.strArr"&gt;
+ *         ...
+ *         &lt;netui-data:repeaterItem&gt;
+ *             &lt;netui:span value="${container.item}" /&gt;
+ *             &lt;netui-data:getData resultId="item" value="${container.item}"/&gt;
+ *             &lt;%
+ *                 String currentItem = (String) pageContext.getAttribute("item");
+ *                 System.out.println(currentItem);
+ *                 ...
+ *             %&gt;
+ *          &lt;/netui-data:repeaterItem&gt;
+ *          ...
+ *      &lt;/netui-data:repeater&gt;
+ * </pre>
  * </p>
  *
- * @jsptagref.tagdescription Evaluates an expression and places the result in the
- * {@link javax.servlet.jsp.PageContext javax.servlet.jsp.PageContext} object,
- * where the data is available to JSP scriptlets.  This tag can be used to extract data from
- * forms, Controller files, and any data binding context and make it available to scriptlets.
- * <p/>
- * <p>The following &lt;netui-data:getData> tag extracts data from the Controller file and
- * places it
- * in the <code>myData</code> field of the PageContext object:
- * <p/>
- * <pre>    &lt;netui-data:getData resultId="myData" value="${pageFlow.myData}"/></pre>
- * <p/>
- * <p>The following scriptlet extracts the data from the <code>PageContext</code>
- * object and writes it to the rendered HTML:
- * <p/>
- * <pre>    &lt;%= pageContext.getAttribute("myData") %></pre>
- * @example In this first sample, the &lt;netui-data:getData> tag loads data into the
- * <code>PageContext</code> object. You can subsequently access the data
- * through the PageContext's <code>getAttribute(String)</code> method.
- * <pre>    &lt;netui:form action="lastNameAction" focus="lastname"&gt;
+ * @jsptagref.tagdescription
+ * <p>
+ * This tag evaluates an expression and places the result in the
+ * {@link javax.servlet.jsp.PageContext} object, where the data is available to the JSP EL and JSP scriptlet.
+ * This tag can be used to extract data from forms, Controller files, and any data binding context and
+ * make it available to scriptlets.
+ * </p>
+ * <p>
+ * In the following example, the getData tag gets the value of a property in the page flow and
+ * makes it available to the JSP via the JSP EL implicit object <code>${pageScope}</code>.
+ * <pre>
+ *     &lt;netui-data:getData resultId="myData" value="${pageFlow.myData}"/>
+ * </pre>
+ * <p>
+ * The following scriptlet extracts the data from the <code>PageContext</code> object and writes it to
+ * the rendered HTML: <br/>
+ * <pre>
+ *     ${pageScope.myData}
+ * </pre>
+ *
+ * @example
+ * In this first example, the &lt;netui-data:getData> tag loads data into the {@link javax.servlet.jsp.PageContext}'s
+ * attribute map.  It can then be accessed using the {@link javax.servlet.jsp.PageContext#getAttribute(String)} method.
+ * <pre>
+ *     &lt;netui:form action="lastNameAction" focus="lastname"&gt;
  *         ...
  *         &lt;netui-data:getData resultId="first" value="${actionForm.firstname}"/&gt;
  *         ...
  *         &lt;%
- *             String firstName = (String) pageContext.getAttribute("first");
+ *             String firstName = (String)pageContext.getAttribute("first");
  *             System.out.println("First Name = " + firstName);
  *             ...
  *         %&gt;
  *         ...
  *     &lt;/netui:form&gt;</pre>
  * <p/>
- * <p>This next sample shows how to use &lt;netui-data:getData&gt; and the <code>PageContext</code>
- * inside of other containers, in this case a &lt;netui-data:repeater> tag. The &lt;netui-data:getData> below
- * extracts each element as the &lt;netui-data:repeater> iterates over the data set and writes it to the Java console:</p>
+ * <p>
+ * This example shows how to use &lt;netui-data:getData&gt; and the <code>PageContext</code> inside of other
+ * containers, in this case a &lt;netui-data:repeater> tag. The &lt;netui-data:getData> below extracts each
+ * element as the &lt;netui-data:repeater> iterates over the data set and writes it to the Java console:
+ * <br/>
  * <pre>    &lt;netui-data:repeater dataSource="pageFlow.strArr"&gt;
  *         ...
  *         &lt;netui-data:repeaterItem&gt;
@@ -76,8 +131,11 @@
  *             %&gt;
  *          &lt;/netui-data:repeaterItem&gt;
  *          ...
- *      &lt;/netui-data:repeater&gt;</pre>
- * @netui:tag name="getData" description="Evaluates an expression and places the result in the JSP's PageContext. Can be used to extract objects from forms, page flows, and other objects that can be databound.  You can then write a scriplet to access the data by using the getAttribute method of javax.servlet.jsp.PageContext."
+ *      &lt;/netui-data:repeater&gt;
+ * </pre>
+ * </p>
+ * @netui:tag name="getData"
+ *            description="Evaluates an expression and places the result in the JSP's PageContext. Can be used to extract objects from forms, page flows, and other objects that can be databound.  You can then write a scriplet to access the data by using the getAttribute method of javax.servlet.jsp.PageContext."
  */
 public class GetData
         extends AbstractClassicTag {
@@ -98,12 +156,13 @@
     }
 
     /**
-     * Set the expression to evaluate.
+     * The data binding expression to evaluate. The result will be stored in the {@link javax.servlet.jsp.PageContext}
+     * object as specified in the <code>resultId</code> attribute.
      *
      * @param value the expression to evaluate
-     * @jsptagref.attributedescription The data binding expression to evaluate. The result will be stored in
-     * the PageContext object as specified in the <code>resultId</code> attribute.
-     * @jsptagref.databindable true
+     * @jsptagref.attributedescription
+     * The data binding expression to evaluate. The result will be stored in the {@link javax.servlet.jsp.PageContext}
+     * object as specified in the <code>resultId</code> attribute.
      * @jsptagref.attributesyntaxvalue <i>expression_value</i>
      * @netui:attribute required="true" rtexprvalue="true"
      */
@@ -112,12 +171,12 @@
     }
 
     /**
-     * Set the String key under which the result of evaluating an expression
-     * will be stored in the PageContext.
+     * Set the String attribute name under which the result of evaluating an expression will be stored in
+     * the {@link javax.servlet.jsp.PageContext}..
      *
      * @param resultId the String key
-     * @jsptagref.attributedescription Specifies the property of the PageContext object where the data will be stored.
-     * @jsptagref.databindable false
+     * @jsptagref.attributedescription
+     * Specifies the property of the PageContext object where the data will be stored.
      * @jsptagref.attributesyntaxvalue <i>string_resultId</i>
      * @netui:attribute required="true"
      */
@@ -128,23 +187,21 @@
     /**
      * Start the tag evaluation.  This tag ignores its body content.
      *
-     * @return SKIP_BODY
+     * @return {@link #SKIP_BODY}
      */
     public int doStartTag() {
         return SKIP_BODY;
     }
 
     /**
-     * Evaluate the expression at the <code>value</code> attribute and
-     * store the result in the PageContext under the attribute key
-     * <code>resultId</code>.  If an existing key in the PageContext's
-     * attribute map exists, a warning will be written to the log file.
-     * If errors occur during expression evaluation, they will be reported
-     * in the JSP page.  If the value returned by the expression is null,
-     * an attribute named <code>resultId</code> will be removed from
+     * Evaluate the expression at the <code>value</code> attribute and store the result in the
+     * {@link javax.servlet.jsp.PageContext} under the attribute key specified in {@link #setResultId(String)}.
+     * If an existing key in the PageContext's attribute map exists, a warning will be written to the log file.
+     * If errors occur during expression evaluation, they will be reported in the JSP page.  If the value
+     * returned by the expression is null, an attribute named <code>resultId</code> will be removed from
      * the PageContext's attribute map.
      *
-     * @return EVAL_PAGE
+     * @return {@link #EVAL_PAGE}
      */
     public int doEndTag()
             throws JspException {

Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/xml/SerializeXML.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/xml/SerializeXML.java?rev=170981&r1=170980&r2=170981&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/xml/SerializeXML.java (original)
+++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/xml/SerializeXML.java Thu May 19 12:28:44 2005
@@ -17,19 +17,21 @@
  */
 package org.apache.beehive.netui.tags.databinding.xml;
 
-import org.apache.beehive.netui.util.internal.InternalStringBuilder;
-
 import javax.servlet.jsp.JspException;
 
 import org.apache.beehive.netui.tags.AbstractClassicTag;
+import org.apache.beehive.netui.util.internal.InternalStringBuilder;
 import org.apache.beehive.netui.util.logging.Logger;
 import org.apache.xmlbeans.XmlObject;
 
 /**
+ * <p>
  * A tag that serializes an XMLBean into the output of a JSP page in order to move data to the browser for data binding.
- *
- * @jsptagref.tagdescription A tag that serializes an XMLBean into the output of a JSP page in order to move data to the browser for data binding.
- * @netui:tag name="serializeXML" description="A tag that serializes an XMLBean into the output of a JSP page in order to move data to the browser for data binding."
+ * </p>
+ * @jsptagref.tagdescription
+ * A tag that serializes an XMLBean into the output of a JSP page in order to move data to the browser for data binding.
+ * @netui:tag name="serializeXML"
+ *            description="A tag that serializes an XMLBean into the output of a JSP page in order to move data to the browser for data binding."
  */
 public class SerializeXML
         extends AbstractClassicTag {
@@ -39,11 +41,22 @@
     private Object _source;
     private String _divName;
 
+    /**
+     * The name of this tag; this value is used for error reporting.
+     * @return the String name of this tag
+     */
     public String getTagName() {
         return "SerializeXML";
     }
 
     /**
+     * Set the source document to be serialized.  The object referenced here should be an instance of
+     * {@link XmlObject}.
+     * @param source the source
+     * @jsptagref.attributedescription
+     * Set the source document to be serialized.  The object referenced here should be an instance of
+     * {@link XmlObject}.
+     * @jsptagref.attributesyntaxvalue <i>object_source</i>
      * @netui:attribute required="true" rtexprvalue="true"
      */
     public void setSource(Object source) {
@@ -51,6 +64,11 @@
     }
 
     /**
+     * Set the name of the div into which this XML will be rendered.
+     * @param divName the div name
+     * @jsptagref.attributedescription
+     * Set the name of the div into which this XML will be rendered.
+     * @jsptagref.attributesyntaxvalue <i>string_divName</i>
      * @netui:attribute required="true" rtexprvalue="true"
      */
     public void setDivName(String divName) {
@@ -62,8 +80,7 @@
     }
 
     public int doEndTag()
-            throws JspException {
-        assert _source != null;
+        throws JspException {
 
         if(_source instanceof XmlObject && _source != null) {
             XmlObject xmlObject = (XmlObject)_source;