Author: SeanRogers
Date: 2011-03-03 22:48:12 -0500 (Thu, 03 Mar 2011)
New Revision: 22044
Added:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richcollapsibleSubTable-Basic_usage.xml_sample
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richcollapsibleSubTable-Basic_usage.png
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml
Log:
Updated with collapsibleSubTable documentation
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml 2011-03-03
18:23:56 UTC (rev 22043)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml 2011-03-04
03:48:12 UTC (rev 22044)
@@ -152,6 +152,153 @@
</section>
</section>
+ <!--<rich:dataTable>-->
+ <section id="sect-Component_Reference-Tables_and_grids-richdataTable">
+ <title><sgmltag><rich:dataTable></sgmltag></title>
+ <para>
+ The <sgmltag><rich:dataTable></sgmltag> component is used to
render a table, including the table's header and footer. It works in conjunction with
the <sgmltag><rich:column></sgmltag> and
<sgmltag><rich:columnGroup></sgmltag> components to list the
contents of a data model.
+ </para>
+ <note>
+ <title><sgmltag><rich:extendedDataTable></sgmltag></title>
+ <para>
+ The <sgmltag><rich:dataTable></sgmltag> component does not
include extended table features, such as data scrolling, row selection, and column
reordering. These features are available as part of the
<sgmltag><rich:extendedDataTable></sgmltag> component; refer to
<xref
linkend="sect-Component_Reference-Tables_and_grids-richextendedDataTable" />
for further details.
+ </para>
+ </note>
+
+ <section id="sect-Component_Reference-richdataTable-Basic_usage">
+ <title>Basic usage</title>
+ <para>
+ The <varname>value</varname> attribute points to the data model, and the
<varname>var</varname> attribute specifies a variable to use when iterating
through the data model.
+ </para>
+ </section>
+
+ <section
id="sect-Component_Reference-richdataTable-Customizing_the_table">
+ <title>Customizing the table</title>
+ <para>
+ The <varname>first</varname> attribute specifies which item in the data
model to start from, and the <varname>rows</varname> attribute specifies the
number of items to list. The <literal>header</literal>,
<literal>footer</literal>, and <literal>caption</literal> facets
can be used to display text, and to customize the appearance of the table through
skinning. demonstrates a simple table implementation.
+ </para>
+ <example
id="exam-Component_Reference-richdataTable-richdataTable_example">
+ <title><sgmltag><rich:dataTable></sgmltag>
example</title>
+
+ <programlisting language="XML" role="XML"><xi:include
href="extras/exam-Component_Reference-Tables_and_grids-richdataTable_example.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ </programlisting>
+ <blockquote>
+ <figure
id="figu-Component_Reference-richdataTable_example-richdataTable_example">
+ <title><sgmltag><rich:dataTable></sgmltag>
example</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/figu-Component_Reference-richdataTable_example.png"
format="PNG" />
+ </imageobject>
+ <textobject>
+ <para>
+ A data table made using the
<sgmltag><rich:dataTable></sgmltag> component.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
+ </blockquote>
+ </example>
+ <para>
+ For details on filtering and sorting data tables, refer to <xref
linkend="sect-Component_Reference-Tables_and_grids-Table_filtering" /> and
<xref linkend="sect-Component_Reference-Tables_and_grids-Table_sorting"
/>.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-richdataTable-Partial_updates">
+ <title>Partial updates</title>
+ <para>
+ 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>
+
+ <section id="sect-Component_Reference-richdataTable-JavaScript_API">
+ <title>JavaScript API</title>
+ <para>
+ The <sgmltag><rich:dataTable></sgmltag> component can
be controlled through the JavaScript API. The JavaScript API provides the following
functions:
+ </para>
+ <variablelist>
+ <varlistentry>
+
<term><function>expandAllSubTables()</function></term>
+ <listitem>
+ <para>
+ Expand any sub-tables contained in the data table.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+
<term><function>collapseAllSubTables()</function></term>
+ <listitem>
+ <para>
+ Collapse any sub-tables contained in the data table.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><function>switchSubTables()</function></term>
+ <listitem>
+ <para>
+ Switch the expanded or collapsed state of any sub-tables contained in
the data table.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><function>filter(columnId, newFilterValue,
[isClearPreviousFilters])</function></term>
+ <listitem>
+ <para>
+ Filter the table based on the column specified with the
<parameter>columnId</parameter> parameter. Use the
<parameter>newFilterValue</parameter> parameter as the filter value. The
optional <parameter>isClearPreviousFilters</parameter> parameter is a boolean
value which, if set to <literal>true</literal>, will clear any previous
filters applied to the table.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><function>sort(columnId, [direction],
[isClearPreviousSorting])</function></term>
+ <listitem>
+ <para>
+ Sort the table based on the column specified with the
<parameter>columnId</parameter> parameter. The option
<parameter>direction</parameter> parameter specifies whether to sort in
ascending or descending order. The optional
<parameter>isClearPreviousSorting</parameter> parameter is a boolean value
which, if set to <literal>true</literal>, will clear any previous sorting
applied to the table.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </section>
+
+ <section id="sect-Component_Reference-richdataTable-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.richfaces.DataTable</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlDataTable</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>org.richfaces.DataTable</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.richfaces.DataTableRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>:
<classname>org.richfaces.taglib.DataTableTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <!-- TODO not in CR1
+ <section
id="sect-Component_Reference-richdataTable-Style_classes_and_skin_parameters">
+ <title>Style classes and skin parameters</title>
+ <xi:include href="skinning/tabl-richdataTable.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ </section>
+ -->
+
+ </section>
+
<!--<rich:column>-->
<section id="sect-Component_Reference-Tables_and_grids-richcolumn">
<title><sgmltag><rich:column></sgmltag></title>
@@ -271,12 +418,14 @@
</itemizedlist>
</section>
+ <!-- TODO not in CR1
<section
id="sect-Component_Reference-richcolumn-Style_classes_and_skin_parameters">
<title>Style classes and skin parameters</title>
<para>
The <sgmltag><rich:column></sgmltag> component uses the
same style classes and skin parameters as the
<sgmltag><rich:dataTable></sgmltag> component. Refer to <xref
linkend="sect-Component_Reference-richdataTable-Style_classes_and_skin_parameters"
/> for details.
</para>
</section>
+ -->
</section>
<!--<rich:columnGroup>-->
@@ -342,12 +491,14 @@
</itemizedlist>
</section>
+ <!-- TODO not in CR1
<section
id="sect-Component_Reference-richcolumnGroup-Style_classes_and_skin_parameters">
<title>Style classes and skin parameters</title>
<para>
The <sgmltag><rich:columnGroup></sgmltag> component uses
the same style classes and skin parameters as the
<sgmltag><rich:dataTable></sgmltag> component. Refer to <xref
linkend="sect-Component_Reference-richdataTable-Style_classes_and_skin_parameters"
/> for details.
</para>
</section>
+ -->
</section>
<!-- Removed -->
@@ -414,561 +565,155 @@
</section>
</section>
-->
-
- <!-- TODO not in M2 -->
- <!--
- <section
id="sect-Component_Reference-Tables_and_grids-richdataFilterSlider">
- <title><sgmltag><rich:dataFilterSlider></sgmltag></title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>:
<classname>org.richfaces.DataFilterSlider</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlDataFilterSlider</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>:
<classname>org.richfaces.DataFilterSlider</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>:
<classname>org.richfaces.DataFilterSliderRenderer</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>tag-class</parameter>:
<classname>org.richfaces.taglib.dataFilterSliderTag</classname>
- </para>
- </listitem>
- </itemizedlist>
+
+ <!--<rich:collapsibleSubTable>-->
+ <section
id="sect-Component_Reference-Tables_and_grids-richcollapsibleSubTable">
+ <title><sgmltag><rich:collapsibleSubTable></sgmltag></title>
<para>
- The <sgmltag><rich:dataFilterSlider></sgmltag> components is
a slider control that can be used for filtering data in a table. The range and increment
of the slider control are defined using the <varname>startRange</varname>,
<varname>endRange</varname>, and <varname>increment</varname>
attributes.
+ The <sgmltag><rich:collapsibleSubTable></sgmltag> component
acts as a child element to a <sgmltag><rich:dataTable></sgmltag>
component. It allows sections of a table to be grouped into collapsible sections. The
<sgmltag><rich:collapsibleSubTable></sgmltag> component works
with the <sgmltag><rich:collapsibleSubTableToggler></sgmltag>
component, which allows the user to expand and collapse the sub tables.
</para>
- <para>
- The slider is bound to a <classname>UIData</classname> component specified
with the <varname>for</varname> attribute. The
<varname>forValRef</varname> attribute refers to the
<varname>value</varname> attribute used by the target component, and the
<varname>filterBy</varname> attribute specifies which object member to filter
according to the slider.
- </para>
- <para>
- The <varname>handleValue</varname> attribute keeps the current handle
position on the slider control; filtering is based on this value. The
<varname>storeResults</varname> attribute allows the
<sgmltag><rich:dataFilterSlider></sgmltag> component to keep the
target <classname>UIData</classname> component in session.
- </para>
- <para>
- The event defined with the <varname>submitOnSlide</varname> attribute is
triggered when the handle value on the slider is changed.
- </para>
- <example
id="exam-Component_Reference-richdataFilterSlider-richdataFilterSlider_example">
- <title><sgmltag><rich:dataFilterSlider></sgmltag>
example</title>
-
-<programlisting language="XML" role="XML"><xi:include
href="extras/exam-Component_Reference-Tables_and_grids-richdataFilterSlider_example.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
- <blockquote>
- <figure
id="figu-Component_Reference-richdataFilterSlider_example-richdataFilterSlider_example">
- <title><sgmltag><rich:dataFilterSlider></sgmltag>
example</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/figu-Component_Reference-richdataFilterSlider-richdataFilterSlider_example.png"
format="PNG" />
- </imageobject>
- <textobject>
- <para>
- A table of car details, filtered using a slider.
- </para>
- </textobject>
- </mediaobject>
- </figure>
- </blockquote>
- </example>
- </section>
- -->
-
- <!--<rich:dataGrid>-->
- <section id="sect-Component_Reference-Tables_and_grids-richdataGrid">
- <title><sgmltag><rich:dataGrid></sgmltag></title>
- <para>
- The <sgmltag><rich:dataGrid></sgmltag> component is used to
arrange data objects in a grid. Values in the grid can be updated dynamically from the
data model, and Ajax updates can be limited to specific rows. The component supports
<literal>header</literal>, <literal>footer</literal>, and
<literal>caption</literal> facets.
- </para>
- <para>
- The <sgmltag><rich:dataGrid></sgmltag> component is similar
in function to the JavaServer Faces
<sgmltag><h:panelGrid></sgmltag> component. However, the
<sgmltag><rich:dataGrid></sgmltag> component additionally allows
iteration through the data model rather than just aligning child components in a grid
layout.
- </para>
- <figure
id="figu-Component_Reference-richdataGrid-The_richdataGrid_component">
- <title>The <sgmltag><rich:dataGrid></sgmltag>
component</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/figu-Component_Reference-richdataGrid-The_richdataGrid_component.png"
format="PNG" />
- </imageobject>
- <textobject>
- <para>
- The <sgmltag><rich:dataGrid></sgmltag> component
displaying four elements in two columns, with a <literal>header</literal>
facet, and <literal>footer</literal> facet containing a data-scrolling
component.
- </para>
- </textobject>
- </mediaobject>
- </figure>
-
- <section id="sect-Component_Reference-richdataGrid-Basic_usage">
+
+ <section
id="sect-Component_Reference-richcollapsibleSubTable-Basic_usage">
<title>Basic usage</title>
<para>
- The <sgmltag><rich:dataGrid></sgmltag> component requires
the <varname>value</varname> attribute, which points to the data model, and
the <varname>var</varname> attribute, which holds the current variable for the
collection of data.
+ The <sgmltag><rich:collapsibleSubTable></sgmltag> component
requires the same basic attributes as the
<sgmltag><rich:dataTable></sgmltag> component. The
<varname>value</varname> attribute points to the collection, and the
<varname>var</varname> attribute specifies a variable to use when iterating
through the collection.
</para>
- </section>
-
- <section
id="sect-Component_Reference-richdataGrid-Customizing_the_grid">
- <title>Customizing the grid</title>
<para>
- The number of columns for the grid is specifed with the
<varname>columns</varname> attribute, and the number of elements to layout
among the columns is determined with the <varname>elements</varname>
attribute. The <varname>first</varname> attribute references the zero-based
element in the data model from which the grid starts.
+ In addition, the
<sgmltag><rich:collapsibleSubTable></sgmltag> component
typically needs a corresponding
<sgmltag><rich:collapsibleSubTableToggler></sgmltag> component
to allow expanding and collapsing. Declare the <varname>id</varname>
identifier on the <sgmltag><rich:collapsibleSubTable></sgmltag>
element so that the
<sgmltag><rich:collapsibleSubTableToggler></sgmltag> component
can reference it. Refer to <xref
linkend="sect-Component_Reference-Tables_and_grids-richcollapsibleSubTableToggler"
/> for details on the
<sgmltag><rich:collapsibleSubTableToggler></sgmltag> component.
</para>
- <example
id="exam-Component_Reference-richdataGrid-richdataGrid_example">
- <title><sgmltag><rich:dataGrid></sgmltag>
example</title>
- <programlisting language="XML" role="XML"><xi:include
href="extras/exam-Component_Reference-richdataGrid-richdataGrid_example.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude"
/></programlisting>
- <blockquote>
- <figure
id="figu-Component_Reference-richdataGrid_example-richdataGrid_example">
- <title><sgmltag><rich:dataGrid></sgmltag>
example</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/figu-Component_Reference-richdataGrid-richdataGrid_example.png"
format="PNG" />
- </imageobject>
- <textobject>
- <para>
- The result of the <sgmltag><rich:dataGrid></sgmltag>
example, with the <literal>header</literal> facet,
<literal>footer</literal> facet, and first element annotated.
- </para>
- </textobject>
- </mediaobject>
- </figure>
- </blockquote>
+ <example
id="exam-Component_Reference-richcollapsibleSubTable-Basic_usage">
+ <title>Basic usage</title>
+ <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-richcollapsibleSubTable-Basic_usage.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ <para>
+ The resulting tables contains multiple sub-tables, grouping the list of cars by
vendor. Each sub-table can be expanded or collapsed using the toggle with the vendor's
name. The screenshot shows all sub-tables collapsed except for the sub-table for Ford
cars.
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/figu-Component_Reference-richcollapsibleSubTable-Basic_usage.png"
format="PNG" />
+ </imageobject>
+ <textobject>
+ <para>
+ A data table containing multiple collapsible sub-tables.
+ </para>
+ </textobject>
+ </mediaobject>
</example>
</section>
-
- <!-- TODO
- <section
id="sect-Component_Reference-richdataGrid-Multiple-page_grids">
- <title>Multiple-page grids</title>
- <para>
- The <sgmltag><rich:dataGrid></sgmltag> component can be
used with the <sgmltag><rich:dataScroller></sgmltag> component
to display multiple pages of grids. Refer to <xref
linkend="sect-Component_Reference-Tables_and_grids-richdataScroller" /> for
details on the <sgmltag><rich:dataScroller></sgmltag>
component.
- </para>
- </section>
- -->
-
- <section id="sect-Component_Reference-richdataGrid-Patial_updates">
- <title>Patial updates</title>
- <para>
- 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>
- </section>
-
- <section id="sect-Component_Reference-richdataGrid-Reference_data">
- <title>Reference data</title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>:
<classname>org.richfaces.DataGrid</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlDataGrid</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>:
<classname>org.richfaces.DataGrid</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>:
<classname>org.richfaces.DataGridRenderer</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>tag-class</parameter>:
<classname>org.richfaces.taglib.DataGridTag</classname>
- </para>
- </listitem>
- </itemizedlist>
- </section>
- <section
id="sect-Component_Reference-richdataGrid-Style_classes_and_skin_parameters">
- <title>Style classes and skin parameters</title>
+ <section
id="sect-Component_Reference-richcollapsibleSubTable-Expanding_and_collapsing_the_sub-table">
+ <title>Expanding and collapsing the sub-table</title>
<para>
- The <sgmltag><rich:dataGrid></sgmltag> component uses the
same style classes and skin parameters as the
<sgmltag><rich:dataTable></sgmltag> component. Refer to <xref
linkend="sect-Component_Reference-richdataTable-Style_classes_and_skin_parameters"
/> for details.
+ Use the boolean <varname>expanded</varname> attribute to control the
current state of the sub-table.
</para>
- </section>
- </section>
-
- <!--<rich:dataScroller>-->
- <section
id="sect-Component_Reference-Tables_and_grids-richdataScroller">
- <title><sgmltag><rich:dataScroller></sgmltag></title>
- <para>
- The <sgmltag><rich:dataScroller></sgmltag> component is used
for navigating through multiple pages of tables or grids.
- </para>
- <figure
id="figu-Component_Reference-richdataScroller-The_richdataScroller_component">
- <title>The <sgmltag><rich:dataScroller></sgmltag>
component</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/figu-Component_Reference-richdataScroller-The_richdataScroller_component.png"
format="PNG" />
- </imageobject>
- <textobject>
- <para>
- A <sgmltag><rich:dataTable></sgmltag> component with a
<sgmltag><rich:dataScroller></sgmltag> component contained in
the <literal>footer</literal> facet.
- </para>
- </textobject>
- </mediaobject>
- </figure>
-
- <section id="sect-Component_Reference-richdataScroller-Basic_usage">
- <title>Basic usage</title>
<para>
- The <sgmltag><rich:dataScroller></sgmltag> must be placed
in the <literal>footer</literal> facet of the table or grid it needs to
control. Alternatively, use the <varname>for</varname> attribute to bind the
parent table or grid to the scroller.
+ The switching mode for performing submissions is determined by the
<code>expandMode</code> attribute, which can have one of the following three
values:
</para>
- <para>
- The bound table or grid should also have the <varname>rows</varname>
attribute defined to limit the number of rows per page.
- </para>
- <para>
- The <sgmltag><rich:dataScroller></sgmltag> component must
be re-rendered whenever a filter changes on the bound table, so that the scroller matches
the current model for the table.
- </para>
- <example id="exam-Component_Reference-richdataScroller-Basic_usage">
- <title>Basic usage</title>
- <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-richdataScroller-Basic_usage.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </example>
- </section>
-
- <section
id="sect-Component_Reference-richdataScroller-Appearance_and_interactivity">
- <title>Appearance and interactivity</title>
- <para>
- The <varname>page</varname> attribute is a value-binding attribute used
to define and save the current page number.
- </para>
- <para>
- The <sgmltag><rich:dataScroller></sgmltag> component
provides a range of controllers for scrolling through tables and grids:
- </para>
<variablelist>
<varlistentry>
- <term>Controls for scrolling by a specific amount</term>
+ <term><literal>server</literal></term>
<listitem>
<para>
- The component includes controls for switching to the first page, the last page,
the next page, and the previous page, as well as controls for fast-forwarding or rewinding
by a set amount. Use the <varname>fastStep</varname> attribute to set the
number of pages to skip when fast-forwarding or rewinding.
+ The default setting. Expansion of the
<sgmltag><rich:collapsibleSubTable></sgmltag> component performs
a common submission, completely re-rendering the page.
</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>ajax</literal></term>
+ <listitem>
<para>
- The appearance of these controls can be customized using the following facets:
<literal>first</literal>, <literal>last</literal>,
<literal>next</literal>, <literal>previous</literal>,
<literal>fastforward</literal>, and <literal>rewind</literal>.
Additionally, there are facets for the controls' disabled states:
<literal>first_disabled</literal>,
<literal>last_disabled</literal>,
<literal>next_disabled</literal>,
<literal>previous_disabled</literal>,
<literal>fastforward_disabled</literal>, and
<literal>rewind_disabled</literal>.
+ Expansion of the
<sgmltag><rich:collapsibleSubTable></sgmltag> component performs
an Ajax form submission, and the content of the data table is rendered.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>Page controls</term>
+ <term><literal>client</literal></term>
<listitem>
<para>
- The component also features a series of numbered controls to jump to a specific
page. Use the <varname>maxPages</varname> attribute to limit the number of
page controls that appear. The current page control is highlighted.
+ Expansion of the
<sgmltag><rich:collapsibleSubTable></sgmltag> component updates
the data table on the client side.
</para>
</listitem>
</varlistentry>
</variablelist>
- <para>
- The <varname>pageIndexVar</varname> and
<varname>pagesVar</varname> attributes are request-scope variables for the
current page and the total number of pages. Use these attributes with the
<literal>pages</literal> facet to provide information about the pages of the
table, as shown in <xref
linkend="exam-Component_Reference-richdataScroller-pages_facet" />.
- </para>
- <example id="exam-Component_Reference-richdataScroller-pages_facet">
- <title><literal>pages</literal> facet</title>
- <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-richdataScroller-pages_facet.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </example>
- <para>
- To add optional separators between controls, define the separators with the
<literal>controlsSeparator</literal> facet.
- </para>
</section>
- <section
id="sect-Component_Reference-richdataScroller-JavaScript_API">
- <title>JavaScript API</title>
- <para>
- The <sgmltag><rich:dataScroller></sgmltag> component
can be controlled through the JavaScript API. The JavaScript API provides the following
functions:
- </para>
- <variablelist>
- <varlistentry>
-
<term><function>switchToPage(pageIndex)</function></term>
- <listitem>
- <para>
- Switch to the page specified with the
<parameter>pageIndex</parameter> parameter.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>next()</function></term>
- <listitem>
- <para>
- Switch to the next page.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>previous()</function></term>
- <listitem>
- <para>
- Switch to the previous page.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>first()</function></term>
- <listitem>
- <para>
- Switch to the first page.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>last()</function></term>
- <listitem>
- <para>
- Switch to the last page.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>fastForward()</function></term>
- <listitem>
- <para>
- Step forward through the pages by the
<varname>fastStep</varname> amount.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>fastRewind()</function></term>
- <listitem>
- <para>
- Step backward through the pages by the
<varname>fastStep</varname> amount.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
-
- <section
id="sect-Component_Reference-richdataScroller-Reference_data">
+ <section
id="sect-Component_Reference-richcollapsibleSubTable-Reference_data">
<title>Reference data</title>
<itemizedlist>
<listitem>
<para>
- <parameter>component-type</parameter>:
<classname>org.richfaces.DataScroller</classname>
+ <parameter>component-type</parameter>:
<classname>org.richfaces.CollapsibleSubTable</classname>
</para>
</listitem>
<listitem>
<para>
- <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlDataScroller</classname>
+ <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlCollapsibleSubTable</classname>
</para>
</listitem>
<listitem>
<para>
- <parameter>component-family</parameter>:
<classname>org.richfaces.DataScroller</classname>
+ <parameter>component-family</parameter>:
<classname>org.richfaces.CollapsibleSubTable</classname>
</para>
</listitem>
<listitem>
<para>
- <parameter>renderer-type</parameter>:
<classname>org.richfaces.DataScrollerRenderer</classname>
+ <parameter>renderer-type</parameter>:
<classname>org.richfaces.CollapsibleSubTable</classname>
</para>
</listitem>
<listitem>
<para>
- <parameter>tag-class</parameter>:
<classname>org.richfaces.taglib.DataScrollerTag</classname>
+ <parameter>tag-class</parameter>:
<classname>org.richfaces.taglib.CollapsibleSubTableTag</classname>
</para>
</listitem>
</itemizedlist>
</section>
- </section>
-
- <!--<rich:dataTable>-->
- <section id="sect-Component_Reference-Tables_and_grids-richdataTable">
- <title><sgmltag><rich:dataTable></sgmltag></title>
- <para>
- The <sgmltag><rich:dataTable></sgmltag> component is used to
render a table, including the table's header and footer. It works in conjunction with
the <sgmltag><rich:column></sgmltag> and
<sgmltag><rich:columnGroup></sgmltag> components to list the
contents of a data model.
- </para>
- <note>
- <title><sgmltag><rich:extendedDataTable></sgmltag></title>
+
+ <section
id="sect-Component_Reference-Tables_and_grids-richcollapsibleSubTableToggler">
+ <title><sgmltag><rich:collapsibleSubTableToggler></sgmltag></title>
<para>
- The <sgmltag><rich:dataTable></sgmltag> component does not
include extended table features, such as data scrolling, row selection, and column
reordering. These features are available as part of the
<sgmltag><rich:extendedDataTable></sgmltag> component; refer to
<xref
linkend="sect-Component_Reference-Tables_and_grids-richextendedDataTable" />
for further details.
+ The <sgmltag><rich:collapsibleSubTableToggler></sgmltag>
component provides a toggle control for the user to expand and collapse sub-tables.
</para>
- </note>
-
- <section id="sect-Component_Reference-richdataTable-Basic_usage">
- <title>Basic usage</title>
- <para>
- The <varname>value</varname> attribute points to the data model, and the
<varname>var</varname> attribute specifies a variable to use when iterating
through the data model.
- </para>
- </section>
-
- <section
id="sect-Component_Reference-richdataTable-Customizing_the_table">
- <title>Customizing the table</title>
- <para>
- The <varname>first</varname> attribute specifies which item in the data
model to start from, and the <varname>rows</varname> attribute specifies the
number of items to list. The <literal>header</literal>,
<literal>footer</literal>, and <literal>caption</literal> facets
can be used to display text, and to customize the appearance of the table through
skinning. demonstrates a simple table implementation.
- </para>
- <example
id="exam-Component_Reference-richdataTable-richdataTable_example">
- <title><sgmltag><rich:dataTable></sgmltag>
example</title>
-
- <programlisting language="XML" role="XML"><xi:include
href="extras/exam-Component_Reference-Tables_and_grids-richdataTable_example.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </programlisting>
- <blockquote>
- <figure
id="figu-Component_Reference-richdataTable_example-richdataTable_example">
- <title><sgmltag><rich:dataTable></sgmltag>
example</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/figu-Component_Reference-richdataTable_example.png"
format="PNG" />
- </imageobject>
- <textobject>
- <para>
- A data table made using the
<sgmltag><rich:dataTable></sgmltag> component.
- </para>
- </textobject>
- </mediaobject>
- </figure>
- </blockquote>
- </example>
- <para>
- For details on filtering and sorting data tables, refer to <xref
linkend="sect-Component_Reference-Tables_and_grids-Table_filtering" /> and
<xref linkend="sect-Component_Reference-Tables_and_grids-Table_sorting"
/>.
- </para>
- </section>
-
- <section id="sect-Component_Reference-richdataTable-Partial_updates">
- <title>Partial updates</title>
- <para>
- 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>
-
- <section id="sect-Component_Reference-richdataTable-JavaScript_API">
- <title>JavaScript API</title>
- <para>
- The <sgmltag><rich:dataTable></sgmltag> component can
be controlled through the JavaScript API. The JavaScript API provides the following
functions:
- </para>
- <variablelist>
- <varlistentry>
-
<term><function>expandAllSubTables()</function></term>
- <listitem>
- <para>
- Expand any sub-tables contained in the data table.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
-
<term><function>collapseAllSubTables()</function></term>
- <listitem>
- <para>
- Collapse any sub-tables contained in the data table.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>switchSubTables()</function></term>
- <listitem>
- <para>
- Switch the expanded or collapsed state of any sub-tables contained in
the data table.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>filter(columnId, newFilterValue,
[isClearPreviousFilters])</function></term>
- <listitem>
- <para>
- Filter the table based on the column specified with the
<parameter>columnId</parameter> parameter. Use the
<parameter>newFilterValue</parameter> parameter as the filter value. The
optional <parameter>isClearPreviousFilters</parameter> parameter is a boolean
value which, if set to <literal>true</literal>, will clear any previous
filters applied to the table.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>sort(columnId, [direction],
[isClearPreviousSorting])</function></term>
- <listitem>
- <para>
- Sort the table based on the column specified with the
<parameter>columnId</parameter> parameter. The option
<parameter>direction</parameter> parameter specifies whether to sort in
ascending or descending order. The optional
<parameter>isClearPreviousSorting</parameter> parameter is a boolean value
which, if set to <literal>true</literal>, will clear any previous sorting
applied to the table.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
-
- <section id="sect-Component_Reference-richdataTable-Reference_data">
- <title>Reference data</title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>:
<classname>org.richfaces.DataTable</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlDataTable</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>:
<classname>org.richfaces.DataTable</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>:
<classname>org.richfaces.DataTableRenderer</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>tag-class</parameter>:
<classname>org.richfaces.taglib.DataTableTag</classname>
- </para>
- </listitem>
- </itemizedlist>
- </section>
- <section
id="sect-Component_Reference-richdataTable-Style_classes_and_skin_parameters">
- <title>Style classes and skin parameters</title>
- <xi:include href="skinning/tabl-richdataTable.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </section>
-
- <!--
- <section
id="sect-Component_Reference-Tables_and_grids-richcollapsibleSubTable">
- <title><sgmltag><rich:collapsibleSubTable></sgmltag></title>
- <para>
- <sgmltag><rich:collapsibleSubTable></sgmltag>
- </para>
-
- <section id="sect-Component_Reference-richdataTable-JavaScript_API">
- <title>JavaScript API</title>
+ <section
id="sect-Component_Reference-richcollapsibleSubTableToggler-Basic_usage">
+ <title>Basic usage</title>
<para>
- The <sgmltag><rich:dataTable></sgmltag> component can be
controlled through the JavaScript API. The JavaScript API provides the following
functions:
+ The <sgmltag><rich:collapsibleSubTableToggler></sgmltag>
component requires the <varname>for</varname> attribute. The
<varname>for</varname> attribute references the
<varname>id</varname> identifier of the
<sgmltag><rich:collapsibleSubTable></sgmltag> component to
control.
</para>
- <variablelist>
- <varlistentry>
- <term><function>expandAllSubTables()</function></term>
- <listitem>
- <para>
- Expand any sub-tables contained in the data table.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
-
<term><function>collapseAllSubTables()</function></term>
- <listitem>
- <para>
- Collapse any sub-tables contained in the data table.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>switchSubTables()</function></term>
- <listitem>
- <para>
- Switch the expanded or collapsed state of any sub-tables contained in the
data table.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>filter(columnId, newFilterValue,
[isClearPreviousFilters])</function></term>
- <listitem>
- <para>
- Filter the table based on the column specified with the
<parameter>columnId</parameter> parameter. Use the
<parameter>newFilterValue</parameter> parameter as the filter value. The
optional <parameter>isClearPreviousFilters</parameter> parameter is a boolean
value which, if set to <literal>true</literal>, will clear any previous
filters applied to the table.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>sort(columnId, [direction],
[isClearPreviousSorting])</function></term>
- <listitem>
- <para>
- Sort the table based on the column specified with the
<parameter>columnId</parameter> parameter. The option
<parameter>direction</parameter> parameter specifies whether to sort in
ascending or descending order. The optional
<parameter>isClearPreviousSorting</parameter> parameter is a boolean value
which, if set to <literal>true</literal>, will clear any previous sorting
applied to the table.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
+ <para>
+ Refer to <xref
linkend="exam-Component_Reference-richcollapsibleSubTable-Basic_usage" /> for
an example using the
<sgmltag><rich:collapsibleSubTable></sgmltag> component. In the
example, the toggle control is placed in a column that spans the width of the table.
Output text next to the toggle control displays the car vendor's name for that
sub-table.
+ </para>
</section>
+
+ <section
id="sect-Component_Reference-richcollapsibleSubTableToggler-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.richfaces.CollapsibleSubTableToggler</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlCollapsibleSubTableToggler</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>org.richfaces.CollapsibleSubTableToggler</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.richfaces.CollapsibleSubTableToggler</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>:
<classname>org.richfaces.taglib.CollapsibleSubTableTogglerTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
- -->
-
</section>
<!--<rich:extendedDataTable>-->
@@ -1354,20 +1099,126 @@
</itemizedlist>
</section>
+ <!--TODO not in CR1
<section
id="sect-Component_Reference-richextendedDataTable-Style_classes_and_skin_parameters">
<title>Style classes and skin parameters</title>
<xi:include href="skinning/tabl-richextendedDataTable.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
</section>
+ -->
</section>
- <!-- TODO
- <section id="sect-Component_Reference-Tables_and_grids-richsubTable">
- <title><sgmltag><rich:subTable></sgmltag></title>
+ <!--<rich:dataGrid>-->
+ <section id="sect-Component_Reference-Tables_and_grids-richdataGrid">
+ <title><sgmltag><rich:dataGrid></sgmltag></title>
<para>
- Incomplete
+ The <sgmltag><rich:dataGrid></sgmltag> component is used to
arrange data objects in a grid. Values in the grid can be updated dynamically from the
data model, and Ajax updates can be limited to specific rows. The component supports
<literal>header</literal>, <literal>footer</literal>, and
<literal>caption</literal> facets.
</para>
+ <para>
+ The <sgmltag><rich:dataGrid></sgmltag> component is similar
in function to the JavaServer Faces
<sgmltag><h:panelGrid></sgmltag> component. However, the
<sgmltag><rich:dataGrid></sgmltag> component additionally allows
iteration through the data model rather than just aligning child components in a grid
layout.
+ </para>
+ <figure
id="figu-Component_Reference-richdataGrid-The_richdataGrid_component">
+ <title>The <sgmltag><rich:dataGrid></sgmltag>
component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/figu-Component_Reference-richdataGrid-The_richdataGrid_component.png"
format="PNG" />
+ </imageobject>
+ <textobject>
+ <para>
+ The <sgmltag><rich:dataGrid></sgmltag> component
displaying four elements in two columns, with a <literal>header</literal>
facet, and <literal>footer</literal> facet containing a data-scrolling
component.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
+
+ <section id="sect-Component_Reference-richdataGrid-Basic_usage">
+ <title>Basic usage</title>
+ <para>
+ The <sgmltag><rich:dataGrid></sgmltag> component requires
the <varname>value</varname> attribute, which points to the data model, and
the <varname>var</varname> attribute, which holds the current variable for the
collection of data.
+ </para>
+ </section>
+
+ <section
id="sect-Component_Reference-richdataGrid-Customizing_the_grid">
+ <title>Customizing the grid</title>
+ <para>
+ The number of columns for the grid is specifed with the
<varname>columns</varname> attribute, and the number of elements to layout
among the columns is determined with the <varname>elements</varname>
attribute. The <varname>first</varname> attribute references the zero-based
element in the data model from which the grid starts.
+ </para>
+ <example
id="exam-Component_Reference-richdataGrid-richdataGrid_example">
+ <title><sgmltag><rich:dataGrid></sgmltag>
example</title>
+ <programlisting language="XML" role="XML"><xi:include
href="extras/exam-Component_Reference-richdataGrid-richdataGrid_example.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude"
/></programlisting>
+ <blockquote>
+ <figure
id="figu-Component_Reference-richdataGrid_example-richdataGrid_example">
+ <title><sgmltag><rich:dataGrid></sgmltag>
example</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/figu-Component_Reference-richdataGrid-richdataGrid_example.png"
format="PNG" />
+ </imageobject>
+ <textobject>
+ <para>
+ The result of the <sgmltag><rich:dataGrid></sgmltag>
example, with the <literal>header</literal> facet,
<literal>footer</literal> facet, and first element annotated.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
+ </blockquote>
+ </example>
+ </section>
+
+ <!-- TODO
+ <section
id="sect-Component_Reference-richdataGrid-Multiple-page_grids">
+ <title>Multiple-page grids</title>
+ <para>
+ The <sgmltag><rich:dataGrid></sgmltag> component can be
used with the <sgmltag><rich:dataScroller></sgmltag> component
to display multiple pages of grids. Refer to <xref
linkend="sect-Component_Reference-Tables_and_grids-richdataScroller" /> for
details on the <sgmltag><rich:dataScroller></sgmltag>
component.
+ </para>
+ </section>
+ -->
+
+ <section id="sect-Component_Reference-richdataGrid-Patial_updates">
+ <title>Patial updates</title>
+ <para>
+ 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>
+ </section>
+
+ <section id="sect-Component_Reference-richdataGrid-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.richfaces.DataGrid</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlDataGrid</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>org.richfaces.DataGrid</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.richfaces.DataGridRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>:
<classname>org.richfaces.taglib.DataGridTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <!-- TODO not in CR1
+ <section
id="sect-Component_Reference-richdataGrid-Style_classes_and_skin_parameters">
+ <title>Style classes and skin parameters</title>
+ <para>
+ The <sgmltag><rich:dataGrid></sgmltag> component uses the
same style classes and skin parameters as the
<sgmltag><rich:dataTable></sgmltag> component. Refer to <xref
linkend="sect-Component_Reference-richdataTable-Style_classes_and_skin_parameters"
/> for details.
+ </para>
+ </section>
+ -->
</section>
- -->
<!--<rich:list>-->
<section id="sect-Component_Reference-Tables_and_grids-richlist">
@@ -1612,12 +1463,256 @@
</itemizedlist>
</section>
+ <!-- TODO not in CR1
<section
id="sect-Component_Reference-richlist-Style_classes_and_skin_parameters">
<title>Style classes and skin parameters</title>
<xi:include href="skinning/tabl-richlist.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
</section>
+ -->
</section>
+ <!--<rich:dataScroller>-->
+ <section
id="sect-Component_Reference-Tables_and_grids-richdataScroller">
+ <title><sgmltag><rich:dataScroller></sgmltag></title>
+ <para>
+ The <sgmltag><rich:dataScroller></sgmltag> component is used
for navigating through multiple pages of tables or grids.
+ </para>
+ <figure
id="figu-Component_Reference-richdataScroller-The_richdataScroller_component">
+ <title>The <sgmltag><rich:dataScroller></sgmltag>
component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/figu-Component_Reference-richdataScroller-The_richdataScroller_component.png"
format="PNG" />
+ </imageobject>
+ <textobject>
+ <para>
+ A <sgmltag><rich:dataTable></sgmltag> component with a
<sgmltag><rich:dataScroller></sgmltag> component contained in
the <literal>footer</literal> facet.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
+
+ <section id="sect-Component_Reference-richdataScroller-Basic_usage">
+ <title>Basic usage</title>
+ <para>
+ The <sgmltag><rich:dataScroller></sgmltag> must be placed
in the <literal>footer</literal> facet of the table or grid it needs to
control. Alternatively, use the <varname>for</varname> attribute to bind the
parent table or grid to the scroller.
+ </para>
+ <para>
+ The bound table or grid should also have the <varname>rows</varname>
attribute defined to limit the number of rows per page.
+ </para>
+ <para>
+ The <sgmltag><rich:dataScroller></sgmltag> component must
be re-rendered whenever a filter changes on the bound table, so that the scroller matches
the current model for the table.
+ </para>
+ <example id="exam-Component_Reference-richdataScroller-Basic_usage">
+ <title>Basic usage</title>
+ <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-richdataScroller-Basic_usage.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ </example>
+ </section>
+
+ <section
id="sect-Component_Reference-richdataScroller-Appearance_and_interactivity">
+ <title>Appearance and interactivity</title>
+ <para>
+ The <varname>page</varname> attribute is a value-binding attribute used
to define and save the current page number.
+ </para>
+ <para>
+ The <sgmltag><rich:dataScroller></sgmltag> component
provides a range of controllers for scrolling through tables and grids:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term>Controls for scrolling by a specific amount</term>
+ <listitem>
+ <para>
+ The component includes controls for switching to the first page, the last page,
the next page, and the previous page, as well as controls for fast-forwarding or rewinding
by a set amount. Use the <varname>fastStep</varname> attribute to set the
number of pages to skip when fast-forwarding or rewinding.
+ </para>
+ <para>
+ The appearance of these controls can be customized using the following facets:
<literal>first</literal>, <literal>last</literal>,
<literal>next</literal>, <literal>previous</literal>,
<literal>fastforward</literal>, and <literal>rewind</literal>.
Additionally, there are facets for the controls' disabled states:
<literal>first_disabled</literal>,
<literal>last_disabled</literal>,
<literal>next_disabled</literal>,
<literal>previous_disabled</literal>,
<literal>fastforward_disabled</literal>, and
<literal>rewind_disabled</literal>.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Page controls</term>
+ <listitem>
+ <para>
+ The component also features a series of numbered controls to jump to a specific
page. Use the <varname>maxPages</varname> attribute to limit the number of
page controls that appear. The current page control is highlighted.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+ The <varname>pageIndexVar</varname> and
<varname>pagesVar</varname> attributes are request-scope variables for the
current page and the total number of pages. Use these attributes with the
<literal>pages</literal> facet to provide information about the pages of the
table, as shown in <xref
linkend="exam-Component_Reference-richdataScroller-pages_facet" />.
+ </para>
+ <example id="exam-Component_Reference-richdataScroller-pages_facet">
+ <title><literal>pages</literal> facet</title>
+ <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-richdataScroller-pages_facet.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ </example>
+ <para>
+ To add optional separators between controls, define the separators with the
<literal>controlsSeparator</literal> facet.
+ </para>
+ </section>
+
+ <section
id="sect-Component_Reference-richdataScroller-JavaScript_API">
+ <title>JavaScript API</title>
+ <para>
+ The <sgmltag><rich:dataScroller></sgmltag> component
can be controlled through the JavaScript API. The JavaScript API provides the following
functions:
+ </para>
+ <variablelist>
+ <varlistentry>
+
<term><function>switchToPage(pageIndex)</function></term>
+ <listitem>
+ <para>
+ Switch to the page specified with the
<parameter>pageIndex</parameter> parameter.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><function>next()</function></term>
+ <listitem>
+ <para>
+ Switch to the next page.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><function>previous()</function></term>
+ <listitem>
+ <para>
+ Switch to the previous page.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><function>first()</function></term>
+ <listitem>
+ <para>
+ Switch to the first page.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><function>last()</function></term>
+ <listitem>
+ <para>
+ Switch to the last page.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><function>fastForward()</function></term>
+ <listitem>
+ <para>
+ Step forward through the pages by the
<varname>fastStep</varname> amount.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><function>fastRewind()</function></term>
+ <listitem>
+ <para>
+ Step backward through the pages by the
<varname>fastStep</varname> amount.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </section>
+
+ <section
id="sect-Component_Reference-richdataScroller-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.richfaces.DataScroller</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlDataScroller</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>org.richfaces.DataScroller</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.richfaces.DataScrollerRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>:
<classname>org.richfaces.taglib.DataScrollerTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ </section>
+
+ <!-- TODO not in M2 -->
+ <!--
+ <section
id="sect-Component_Reference-Tables_and_grids-richdataFilterSlider">
+ <title><sgmltag><rich:dataFilterSlider></sgmltag></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.richfaces.DataFilterSlider</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlDataFilterSlider</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>org.richfaces.DataFilterSlider</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.richfaces.DataFilterSliderRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>:
<classname>org.richfaces.taglib.dataFilterSliderTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The <sgmltag><rich:dataFilterSlider></sgmltag> components is
a slider control that can be used for filtering data in a table. The range and increment
of the slider control are defined using the <varname>startRange</varname>,
<varname>endRange</varname>, and <varname>increment</varname>
attributes.
+ </para>
+ <para>
+ The slider is bound to a <classname>UIData</classname> component specified
with the <varname>for</varname> attribute. The
<varname>forValRef</varname> attribute refers to the
<varname>value</varname> attribute used by the target component, and the
<varname>filterBy</varname> attribute specifies which object member to filter
according to the slider.
+ </para>
+ <para>
+ The <varname>handleValue</varname> attribute keeps the current handle
position on the slider control; filtering is based on this value. The
<varname>storeResults</varname> attribute allows the
<sgmltag><rich:dataFilterSlider></sgmltag> component to keep the
target <classname>UIData</classname> component in session.
+ </para>
+ <para>
+ The event defined with the <varname>submitOnSlide</varname> attribute is
triggered when the handle value on the slider is changed.
+ </para>
+ <example
id="exam-Component_Reference-richdataFilterSlider-richdataFilterSlider_example">
+ <title><sgmltag><rich:dataFilterSlider></sgmltag>
example</title>
+
+<programlisting language="XML" role="XML"><xi:include
href="extras/exam-Component_Reference-Tables_and_grids-richdataFilterSlider_example.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+</programlisting>
+ <blockquote>
+ <figure
id="figu-Component_Reference-richdataFilterSlider_example-richdataFilterSlider_example">
+ <title><sgmltag><rich:dataFilterSlider></sgmltag>
example</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/figu-Component_Reference-richdataFilterSlider-richdataFilterSlider_example.png"
format="PNG" />
+ </imageobject>
+ <textobject>
+ <para>
+ A table of car details, filtered using a slider.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
+ </blockquote>
+ </example>
+ </section>
+ -->
+
<section
id="sect-Component_Reference-Tables_and_grids-Table_filtering">
<title>Table filtering</title>
<!-- In development notification -->
Added:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richcollapsibleSubTable-Basic_usage.xml_sample
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richcollapsibleSubTable-Basic_usage.xml_sample
(rev 0)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richcollapsibleSubTable-Basic_usage.xml_sample 2011-03-04
03:48:12 UTC (rev 22044)
@@ -0,0 +1,55 @@
+<rich:dataTable value="#{carsBean.inventoryVendorLists}"
var="list">
+ <f:facet name="header">
+ <rich:columnGroup>
+ <rich:column colspan="6">
+ <h:outputText value="Cars marketplace" />
+ </rich:column>
+ <rich:column breakRowBefore="true">
+ <h:outputText value="Model" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Price" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Mileage" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="VIN Code" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Items stock" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Days Live" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+ <rich:column colspan="6">
+ <rich:collapsibleSubTableToggler for="sbtbl" />
+ <h:outputText value="#{list.vendor}" />
+ </rich:column>
+ <rich:collapsibleSubTable value="#{list.vendorItems}"
var="item" id="sbtbl"
+ expandMode="client">
+ <rich:column>
+ <h:outputText value="#{item.model}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{item.price}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{item.mileage}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{item.vin}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{item.stock}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{item.daysLive}" />
+ </rich:column>
+ <f:facet name="footer">
+ <h:outputText value="Total of #{list.vendor} Cars: #{list.count}"
/>
+ </f:facet>
+ </rich:collapsibleSubTable>
+</rich:dataTable>
Added:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richcollapsibleSubTable-Basic_usage.png
===================================================================
(Binary files differ)
Property changes on:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richcollapsibleSubTable-Basic_usage.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream