Author: SeanRogers
Date: 2010-05-24 02:41:57 -0400 (Mon, 24 May 2010)
New Revision: 17198
Added:
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-Tables_and_grids-a4jrepeat_example.xml_sample
Modified:
root/docs/trunk/Component_Reference/en-US/Component_Reference.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Actions.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Tables_and_grids.xml
Log:
a4j:repeat
Modified: root/docs/trunk/Component_Reference/en-US/Component_Reference.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/Component_Reference.xml 2010-05-23 19:51:06
UTC (rev 17197)
+++ root/docs/trunk/Component_Reference/en-US/Component_Reference.xml 2010-05-24 06:41:57
UTC (rev 17198)
@@ -21,7 +21,9 @@
<!--
<xi:include href="chap-Component_Reference-Rich_inputs.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="chap-Component_Reference-Panels_and_containers.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ -->
<xi:include href="chap-Component_Reference-Tables_and_grids.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <!--
<xi:include href="chap-Component_Reference-Trees.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="chap-Component_Reference-Menus_and_toolbars.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
--><xi:include href="chap-Component_Reference-Output_and_messages.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Actions.xml
===================================================================
---
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Actions.xml 2010-05-23
19:51:06 UTC (rev 17197)
+++
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Actions.xml 2010-05-24
06:41:57 UTC (rev 17198)
@@ -477,6 +477,48 @@
</para>
</section>
+ <section id="sect-Component_Reference-Tables_and_grids-a4jrepeat">
+ <title><sgmltag><a4j:repeat></sgmltag></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.Repeat</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>javax.faces.Data</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class:
<classname>org.ajax4jsf.component.html.HtmlAjaxRepeat</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type:
<classname>org.ajax4jsf.components.RepeatRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The <sgmltag><a4j:repeat></sgmltag> component is used to
iterate changes through a repeated collection of components. It allows specific rows of
items to be updated without sending Ajax requests for the entire collection. The
<sgmltag><a4j:repeat></sgmltag> component forms the basis for
many of the tabular components detailed in <xref
linkend="chap-Component_Reference-Tables_and_grids" />.
+ </para>
+ <para>
+ The contents of the collection are determined using Expression Language
(<acronym>EL</acronym>). The data model for the contents is specified with the
<varname>value</varname> attribute. The <varname>var</varname>
attribute names the object to use when iterating through the collection. This object is
then referenced in the relevant child components. After an Ajax request, only the rows
specified with the <varname>ajaxKeys</varname> attribute are updated rather
than the entire collection. <xref
linkend="exam-Component_Reference-Tables_and_grids-a4jrepeat_example" />
shows how to use <sgmltag><a4j:repeat></sgmltag> to maintain a
simple table.
+ </para>
+ <example
id="exam-Component_Reference-Tables_and_grids-a4jrepeat_example">
+ <title><sgmltag><a4j:repeat></sgmltag>
example</title>
+ <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-Tables_and_grids-a4jrepeat_example.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ <para>
+ Each row of a table contains two cells: one showing the item code, and the other
showing the item price. The table is generated by iterating through items in the
<code>repeatBeans.items</code> data model.
+ </para>
+ </example>
+ <para>
+ The <sgmltag><a4j:repeat></sgmltag> component uses other
attributes common to iteration components, such as the
<varname>first</varname> attribute for specifying the first item for
iteration, and the <varname>rows</varname> attribute for specifying the number
of rows of items to display.
+ </para>
+ </section>
+
<section id="sect-Component_Reference-Actions-a4jsupport">
<title><sgmltag><a4j:support></sgmltag></title>
<itemizedlist>
Modified:
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Tables_and_grids.xml
===================================================================
---
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Tables_and_grids.xml 2010-05-23
19:51:06 UTC (rev 17197)
+++
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Tables_and_grids.xml 2010-05-24
06:41:57 UTC (rev 17198)
@@ -686,13 +686,6 @@
</para>
</section>
- <section id="sect-Component_Reference-Tables_and_grids-richrepeat">
- <title><sgmltag><rich:repeat></sgmltag></title>
- <para>
- Incomplete
- </para>
- </section>
-
<section id="sect-Component_Reference-Tables_and_grids-richsubTable">
<title><sgmltag><rich:subTable></sgmltag></title>
<para>
Added:
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-Tables_and_grids-a4jrepeat_example.xml_sample
===================================================================
---
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-Tables_and_grids-a4jrepeat_example.xml_sample
(rev 0)
+++
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-Tables_and_grids-a4jrepeat_example.xml_sample 2010-05-24
06:41:57 UTC (rev 17198)
@@ -0,0 +1,10 @@
+<table>
+ <tbody>
+ <a4j:repeat value="#{repeatBean.items}" var="item"
ajaxKeys="#{updateBean.updatedRow}">
+ <tr>
+ <td><h:outputText value="#{item.code}"
id="item1" /></td>
+ <td><h:outputText value="#{item.price}"
id="item2" /></td>
+ </tr>
+ </a4j:repeat>
+ </tbody>
+</table>