Author: SeanRogers
Date: 2011-02-08 22:37:42 -0500 (Tue, 08 Feb 2011)
New Revision: 21555
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/extras/exam-Component_Reference-Table_sorting-External_sorting.xml_sample
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Tables_and_grids-richextendedDataTable_example.xml_sample
Log:
Updated sorting information as per RF-10445
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-02-08
23:55:43 UTC (rev 21554)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml 2011-02-09
03:37:42 UTC (rev 21555)
@@ -927,39 +927,15 @@
<section
id="sect-Component_Reference-richextendedDataTable-Filtering">
<title>Filtering</title>
<para>
- <!--
- The example uses the <literal>filter</literal> facet of the
<sgmltag><rich:column></sgmltag> component to display the text
field.
- -->
- A user can type their criteria into the text field to customize the filter of the
column below. For full details on filtering tables, refer to <xref
linkend="sect-Component_Reference-Tables_and_grids-Table_filtering" />.
+ The example table features a text field as part of the header of a column. A user
can type their criteria into the text field to customize the filter of the column below.
For full details on filtering tables, refer to <xref
linkend="sect-Component_Reference-Tables_and_grids-Table_filtering" />.
</para>
</section>
<section id="sect-Component_Reference-richextendedDataTable-Sorting">
<title>Sorting</title>
- <!--
<para>
- When hovering the mouse over a column header, a menu button appears to the
right-hand side, as shown in <xref
linkend="figu-Component_Reference-richextendedDataTable-Column_menu" />. This
menu allows the user to sort the contents of the column, group the table by the column, or
hide and show columns.
+ The example table features controls in the column headers for sorting the the table
according to the relevant column. The value of the data model to sort by is specified with
the <varname>sortBy</varname> attribute. For full details on sorting tables,
refer to <xref
linkend="sect-Component_Reference-Tables_and_grids-Table_sorting" />.
</para>
- <figure
id="figu-Component_Reference-richextendedDataTable-Column_menu">
- <title>Column menu</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/figu-Component_Reference-Tables_and_grids-Column_menu.png"
format="PNG" width="444" />
- </imageobject>
- <textobject>
- <para>
- The menu for sorting, grouping, and hiding or showing columns.
- </para>
- </textobject>
- </mediaobject>
- </figure>
- -->
- <para>
- <!--
- Each column can allow sorting by setting the
<sgmltag><rich:column></sgmltag> component's
<varname>sortable</varname> attribute to <literal>true</literal>.
- -->
- Each column can be used to sort the contents of the table. The value of the data
model to sort by is specified with the <varname>sortBy</varname> attribute.
Columns can be quickly sorted either ascending or descending by clicking on the
directional icon next to the column title. The directional icons are defined in each
<sgmltag><rich:column></sgmltag> component with the
<varname>sortIconAscending</varname> and
<varname>sortIconDescending</varname> attributes, for ascending and descending
icons respectively. For full details on sorting tables, refer to <xref
linkend="sect-Component_Reference-Tables_and_grids-Table_sorting" />.
- </para>
</section>
<!--
@@ -1412,7 +1388,7 @@
</important>
<para>
- Tables entries can be sorted by the user through either the basic method built in to
the <sgmltag><rich:column></sgmltag> component, or by defining
external sorting algorithms. Refer to <xref
linkend="sect-Component_Reference-Tables_and_grids-richcolumn" /> for details
on using the <sgmltag><rich:column></sgmltag> component in
tables.
+ Tables entries can be sorted <!--by the user through either the basic method built
in to the <sgmltag><rich:column></sgmltag> component, or
-->by defining external sorting algorithms. Refer to <xref
linkend="sect-Component_Reference-Tables_and_grids-richcolumn" /> for details
on using the <sgmltag><rich:column></sgmltag> component in
tables.
</para>
<note>
<title>Sorting non-English tables</title>
@@ -1421,6 +1397,7 @@
</para>
</note>
+ <!--
<section id="sect-Component_Reference-Tables_and_grids-Basic_sorting">
<title>Basic sorting</title>
<para>
@@ -1453,15 +1430,13 @@
Use the <varname>sortMode</varname> attribute to determine how multiple
columns are sorted. By default, the value of the <varname>sortMode</varname>
attribute is <literal>single</literal>, so tables are only sorted by a single
column. Each time the header of a column is clicked the entire table is re-sorted
according to that column. Set <code>sortMode="multiple"</code> to
allow tables to be sorted by a primary column, then by a secondary column, and so on.
</para>
</section>
+ -->
<section id="sect-Component_Reference-Table_sorting-External_sorting">
<title>External sorting</title>
<para>
- If you require more advanced sorting using custom functions or expressions, use the
external sorting properties of the
<sgmltag><rich:column></sgmltag> component.
+ Bind the <varname>sortOrder</varname> attribute to bean properties to
manage the sorting order externally. The bean must handle all the sorting algorithms.
<xref linkend="exam-Component_Reference-Table_sorting-External_sorting" />
demonstrates table sorting using an external control.
</para>
- <para>
- Deactivate the built-in sorting by setting
<code>selfSorted="false"</code> for the
<sgmltag><rich:column></sgmltag> component. You can then bind
the <varname>sortOrder</varname> attribute to bean properties and manage the
sorting order externally.
- </para>
<example
id="exam-Component_Reference-Table_sorting-External_sorting">
<title>External sorting</title>
<programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-Table_sorting-External_sorting.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Table_sorting-External_sorting.xml_sample
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Table_sorting-External_sorting.xml_sample 2011-02-08
23:55:43 UTC (rev 21554)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Table_sorting-External_sorting.xml_sample 2011-02-09
03:37:42 UTC (rev 21555)
@@ -2,28 +2,28 @@
var="category" rows="20" id="table"
reRender="ds2"
sortPriority="#{sortingBean.prioritList}">
<rich:column id="make" sortBy="#{category.make}"
- sortOrder="#{sortingBean.makeDirection}"
selfSorted="false">
+ sortOrder="#{sortingBean.makeDirection}">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Make" />
</f:facet>
<h:outputText value="#{category.make}" />
</rich:column>
<rich:column id="model" sortBy="#{category.model}"
- sortOrder="#{sortingBean.modelDirection}"
selfSorted="false">
+ sortOrder="#{sortingBean.modelDirection}">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Model"
/>
</f:facet>
<h:outputText value="#{category.model}" />
</rich:column>
<rich:column id="price" sortBy="#{category.price}"
- sortOrder="#{sortingBean.priceDirection}"
selfSorted="false">
+ sortOrder="#{sortingBean.priceDirection}">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Price"
/>
</f:facet>
<h:outputText value="#{category.price}" />
</rich:column>
<rich:column id="mileage" sortBy="#{category.mileage}"
- sortOrder="#{sortingBean.mileageDirection}"
selfSorted="false">
+ sortOrder="#{sortingBean.mileageDirection}">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Mileage"
/>
</f:facet>
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Tables_and_grids-richextendedDataTable_example.xml_sample
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Tables_and_grids-richextendedDataTable_example.xml_sample 2011-02-08
23:55:43 UTC (rev 21554)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Tables_and_grids-richextendedDataTable_example.xml_sample 2011-02-09
03:37:42 UTC (rev 21555)
@@ -1,24 +1,24 @@
<rich:extendedDataTable id="edt" value="#{extendedDT.dataModel}"
var="edt" width="500px" height="500px"
selectedClass="dataTableSelectedRow" sortMode="single"
selectionMode="multi" selection="#{extendedDT.selection}"
rowKeyVar="rkvar" tableState="#{extendedDT.tableState}">
- <rich:column id="id" headerClass="dataTableHeader"
width="50" label="Id" sortable="true"
sortBy="#{edt.id}" sortIconAscending="dataTableAscIcon"
sortIconDescending="dataTableDescIcon">
+ <rich:column id="id" headerClass="dataTableHeader"
width="50" label="Id" sortBy="#{edt.id}">
<f:facet name="header">
<h:outputText value="Id" />
</f:facet>
<h:outputText value="#{edt.id}" />
</rich:column>
- <rich:column id="name" width="300"
headerClass="dataTableHeader" label="Name" sortable="true"
sortBy="#{edt.name}" sortIconAscending="dataTableAscIcon"
sortIconDescending="dataTableDescIcon" filterBy="#{edt.name}"
filterEvent="keyup" visible="false">
+ <rich:column id="name" width="300"
headerClass="dataTableHeader" label="Name"
sortBy="#{edt.name}" filterBy="#{edt.name}"
filterEvent="keyup" visible="false">
<f:facet name="header">
<h:outputText value="Name" />
</f:facet>
<h:outputText value="#{edt.name}" />
</rich:column>
- <rich:column id="date" width="100"
headerClass="dataTableHeader" label="Date" sortable="true"
comparator="#{extendedDT.dateComparator}"
sortIconAscending="dataTableAscIcon"
sortIconDescending="dataTableDescIcon">
+ <rich:column id="date" width="100"
headerClass="dataTableHeader" label="Date"
comparator="#{extendedDT.dateComparator}">
<f:facet name="header">
<h:outputText value="Date" />
</f:facet>
<h:outputText value="#{edt.date}"><f:convertDateTime
pattern="yyyy-MM-dd HH:mm:ss" />
</h:outputText>
</rich:column>
- <rich:column id="group" width="50"
headerClass="dataTableHeader" label="Group" sortable="true"
sortBy="#{edt.group}" sortIconAscending="dataTableAscIcon"
sortIconDescending="dataTableDescIcon">
+ <rich:column id="group" width="50"
headerClass="dataTableHeader" label="Group"
sortBy="#{edt.group}">
<f:facet name="header">
<h:outputText value="Group" />
</f:facet>