Author: SeanRogers
Date: 2010-09-14 02:27:07 -0400 (Tue, 14 Sep 2010)
New Revision: 19183
Modified:
modules/docs/branches/M3_draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml
Log:
Removed ajaxKeys references and updated to new approach (RF-9139)
Modified:
modules/docs/branches/M3_draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml
===================================================================
---
modules/docs/branches/M3_draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml 2010-09-14
01:39:52 UTC (rev 19182)
+++
modules/docs/branches/M3_draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml 2010-09-14
06:27:07 UTC (rev 19183)
@@ -35,24 +35,95 @@
</example>
</section>
- <!-- TODO
<section
id="sect-Component_Reference-a4jrepeat-Limited_views_and_partial_updates">
<title>Limited views and partial updates</title>
<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>
<para>
- After an Ajax request, only the rows specified with the
<varname>ajaxKeys</varname> attribute are updated rather than the entire
collection.
+ Specific cells, rows, and columns can be updated without sending Ajax requests for
the entire collection. Components that cause the change can specify which part of the
table to update through the <varname>render</varname> attribute. The
<varname>render</varname> attribute specifies which part of a table to
update:
</para>
- <example
id="exam-Component_Reference-a4jrepeat-Limited_views_and_partial_updates">
- <title>Limited views and partial updates</title>
- <programlisting language="XML" role="XML"><xi:include
href="extras/exam-Component_Reference-Tables_and_grids-Limited_views_and_partial_updates.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude"
/></programlisting>
- <para>
- The table rows are limited using the <varname>first</varname> and
<varname>rows</varname> attributes. Only those rows specified through the
<varname>ajaxKeys</varname> are updated after an Ajax request.
- </para>
- </example>
+ <variablelist>
+ <varlistentry>
+ <term><code><varname>render</varname>=<replaceable>cellId</replaceable></code></term>
+ <listitem>
+ <para>
+ Update the cell with an identifier of
<replaceable>cellId</replaceable> within the row that contains the current
component.
+ </para>
+ <para>
+ Instead of a specific identifier, the
<replaceable>cellId</replaceable> reference could be a variable:
<code><varname>render</varname>=#{<replaceable>bean.cellToUpdate</replaceable>}</code>.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><code><varname>render</varname>=<replaceable>tableId</replaceable>:<replaceable>rowId</replaceable></code></term>
+ <listitem>
+ <para>
+ Update the row with an identifier of <replaceable>rowId</replaceable>
within the table with an identifier of <replaceable>tableId</replaceable>.
Alternatively, if the current component is contained within the table, use
<code><varname>render</varname>=<replaceable>rowId</replaceable></code>.
+ </para>
+ <para>
+ Instead of a specific identifier, the
<replaceable>tableId</replaceable> of
<replaceable>rowId</replaceable> references could be variables:
<code><varname>render</varname>=<replaceable>tableId</replaceable>:#{<replaceable>bean.rowToUpdate</replaceable>}</code>.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><code><varname>render</varname>=<replaceable>tableId</replaceable>:<replaceable>rowId</replaceable>:<replaceable>cellId</replaceable></code></term>
+ <listitem>
+ <para>
+ Update the cell with an identifier of
<replaceable>cellId</replaceable>, within the row with and identifier of
<replaceable>rowId</replaceable>, within the table with an identifier of
<replaceable>tableId</replaceable>.
+ </para>
+ <para>
+ Instead of a specific identifier, any of the references could be variables:
<code><varname>render</varname>=<replaceable>tableId</replaceable>:#{<replaceable>bean.rowToUpdate</replaceable>}:<replaceable>cellId</replaceable></code>.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+ Alternatively, keywords can be used with the <varname>render</varname>
attribute:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term><code><varname>render</varname>=@column</code></term>
+ <listitem>
+ <para>
+ Update the column that contains the current component.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><code><varname>render</varname>=@row</code></term>
+ <listitem>
+ <para>
+ Update the row that contains the current component.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><code><varname>render</varname>=<replaceable>tableId</replaceable>:@body</code></term>
+ <listitem>
+ <para>
+ Update the body of the table with the identifier of
<replaceable>tableId</replaceable>. Alternatively, if the current component is
contained within the table, use
<code><varname>render</varname>=@body</code> instead.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><code><varname>render</varname>=<replaceable>tableId</replaceable>:@header</code></term>
+ <listitem>
+ <para>
+ Update the header of the table with the identifier of
<replaceable>tableId</replaceable>. Alternatively, if the current component is
contained within the table, use
<code><varname>render</varname>=@header</code> instead.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><code><varname>render</varname>=<replaceable>tableId</replaceable>:@footer</code></term>
+ <listitem>
+ <para>
+ Update the footer of the table with the identifier of
<replaceable>tableId</replaceable>. Alternatively, if the current component is
contained within the table, use
<code><varname>render</varname>=@footer</code> instead.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</section>
- -->
<section id="sect-Component_Reference-a4jrepeat-Reference_data">
<title>Reference data</title>
@@ -455,12 +526,8 @@
<section id="sect-Component_Reference-richdataGrid-Patial_updates">
<title>Patial updates</title>
<para>
- As the component is based on the
<sgmltag><a4j:repeat></sgmltag> component, it can be partially
updated with Ajax. The <varname>ajaxKeys</varname> attribute allows row keys
to be defined, which are updated after an Ajax request.
+ As <sgmltag><rich:dataGrid></sgmltag> the component is
based on the <sgmltag><a4j:repeat></sgmltag> component, it can
be partially updated with Ajax. Refer to <xref
linkend="sect-Component_Reference-a4jrepeat-Limited_views_and_partial_updates"
/> for details on partially updating the
<sgmltag><rich:dataGrid></sgmltag> component.
</para>
- <example id="exam-Component_Reference-richdataGrid-ajaxKeys_example">
- <title><varname>ajaxKeys</varname> example</title>
- <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-richdataGrid-ajaxKeys_example.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </example>
</section>
<section id="sect-Component_Reference-richdataGrid-Reference_data">
@@ -586,7 +653,7 @@
<section id="sect-Component_Reference-richdataTable-Partial_updates">
<title>Partial updates</title>
<para>
- The <sgmltag><rich:dataTable></sgmltag> component is based
on the <sgmltag><a4j:repeat></sgmltag> component, and as such it
can be partially updated using Ajax. The <varname>ajaxKeys</varname> attribute
defines the rows to be updated during an Ajax request.
+ As <sgmltag><rich:dataTable></sgmltag> the component is
based on the <sgmltag><a4j:repeat></sgmltag> component, it can
be partially updated with Ajax. Refer to <xref
linkend="sect-Component_Reference-a4jrepeat-Limited_views_and_partial_updates"
/> for details on partially updating the
<sgmltag><rich:dataTable></sgmltag> component.
</para>
</section>