Author: SeanRogers
Date: 2011-04-05 20:38:48 -0400 (Tue, 05 Apr 2011)
New Revision: 22375
Added:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richhashParam-richhashParam.xml_sample
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/Component_Reference.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Functionality_extension.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Functions.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Panels.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml
Log:
Completed revision for engineering review: RFPL-1380
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/Component_Reference.xml
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/Component_Reference.xml 2011-04-05
16:00:15 UTC (rev 22374)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/Component_Reference.xml 2011-04-06
00:38:48 UTC (rev 22375)
@@ -27,9 +27,7 @@
<xi:include href="chap-Component_Reference-Drag_and_drop.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="chap-Component_Reference-Layout_and_appearance.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="chap-Component_Reference-Functions.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <!--
<xi:include href="chap-Component_Reference-Functionality_extension.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- -->
</part>
<!--
<xi:include href="Revision_History.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Functionality_extension.xml
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Functionality_extension.xml 2011-04-05
16:00:15 UTC (rev 22374)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Functionality_extension.xml 2011-04-06
00:38:48 UTC (rev 22375)
@@ -4,8 +4,144 @@
<chapter id="chap-Component_Reference-Functionality_extension">
<title>Functionality extension</title>
<para>
- Incomplete
+ Read this chapter for details on miscellaneous components that provide extended
functionality to web applications.
</para>
+
+ <section
id="sect-Component_Reference-Functionality_extension-richcomponentControl">
+ <title><sgmltag><rich:componentControl></sgmltag></title>
+ <para>
+ The <sgmltag><rich:componentControl></sgmltag> behavior
allows JavaScript API functions to be called on target components. The functions are
called after defined events are triggered on the component to with the
<sgmltag><rich:componentControl></sgmltag> behavior is attached.
Initialization variants and activation events can be customized, and parameters can be
passed to the target component.
+ </para>
+
+ <section
id="sect-Component_Reference-richcomponentControl-Basic_usage">
+ <title>Basic usage</title>
+ <para>
+ The <varname>operation</varname> attribute is required to attach
JavaScript functions to the parent component, along with either the
<varname>target</varname> or <varname>selector</varname>
attributes. Use the <varname>operation</varname> attribute to specify the
JavaScript API function to perform. Use the <varname>target</varname>
attribute to define the <varname>id</varname> identifier of the target
component, or use the <varname>selector</varname> attribute to define a number
of target components through the use of valid jQuery selectors.
+ </para>
+ <para>
+ Use the <varname>event</varname> attribute to specify the event that
triggers the JavaScript API function call if it is different from the default triggering
event for the parent component.
+ </para>
+ <example
id="exam-Component_Reference-richcomponentControl-richcomponentControl_basic_usage">
+ <title><sgmltag><rich:componentControl></sgmltag>
basic usage</title>
+ <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-richcomponentControl-richcomponentControl_basic_usage.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ <para>
+ The example contains a single command button, which when clicked shows the modal
panel with the identifier <literal>ccModalPanelID</literal>.
+ </para>
+ </example>
+ </section>
+
+ <!--
+ <section
id="sect-Component_Reference-richcomponentControl-Attaching_to_a_component">
+ <title>Attaching to a component</title>
+ <para>
+ The <varname>attachTo</varname> attribute can be used to attach the event
to a component other than the parent component. If no
<varname>attachTo</varname> attribute is supplied, the
<sgmltag><rich:componentControl></sgmltag> component's
parent is used, as in <xref
linkend="exam-Component_Reference-richcomponentControl-richcomponentControl_basic_usage"
/>.
+ </para>
+ <example
id="exam-Component_Reference-richcomponentControl-Attaching_richcomponentControl_to_a_component">
+ <title>Attaching
<sgmltag><rich:componentControl></sgmltag> to a
component</title>
+ <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-richcomponentControl-Attaching_richcomponentControl_to_a_component.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ <para>
+ In the example, the <literal>click</literal> event of the component with
the identifier <literal>ccCalendarID</literal> will trigger the
<literal>Expand</literal> operation for the component with the identifier
<literal>doExpandCalendarID</literal>.
+ </para>
+ </example>
+ </section>
+ -->
+
+ <section
id="sect-Component_Reference-richcomponentControl-Passing_parameters_to_API_methods">
+ <title>Passing parameters to API methods</title>
+ <para>
+ The operation can receive parameters through nested
<sgmltag><f:param></sgmltag> elements.
+ </para>
+ <example
id="exam-Component_Reference-richcomponentControl-Using_parameters">
+ <title>Using parameters</title>
+ <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-richcomponentControl-Using_parameters-1.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ </example>
+ </section>
+
+ <section
id="sect-Component_Reference-richcomponentControl-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.richfaces.ComponentControl</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlComponentControl</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>org.richfaces.ComponentControl</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.richfaces.ComponentControlRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>:
<classname>org.richfaces.taglib.ComponentControlTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section
id="sect-Component_Reference-Functionality_extension-richhashParam">
+ <title><sgmltag><rich:hashParam></sgmltag></title>
+ <para>
+ The <sgmltag><rich:hashParam></sgmltag> component allows
client-side parameters to be grouped into a hash map. The hash map can then be passed to
the client JavaScript API functions of any RichFaces component.
+ </para>
+
+ <section id="sect-Component_Reference-richhashParam-Basic_usage">
+ <title>Basic usage</title>
+ <para>
+ Nest parameter tags in the
<sgmltag><rich:hashParam></sgmltag> component to group them in
the hash map. The hash map itself can then be passed as a function parameter.
+ </para>
+ <example id="exam-Component_Reference-richhashParam-richhashParam">
+ <title><sgmltag><rich:hashParam></sgmltag></title>
+ <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-richhashParam-richhashParam.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ <para>
+ The example illustrates the use of the
<sgmltag><rich:hashParam></sgmltag> component to group multiple
parameters into a hash map. The parameters are passed through to the
<function>show</function> function pop-up panel with the
<literal>popupPanel</literal> identifier.
+ </para>
+ </example>
+ </section>
+
+ <section id="sect-Component_Reference-richhashParam-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.richfaces.HashParam</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlHashParam</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>org.richfaces.HashParam</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.richfaces.HashParamRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>:
<classname>org.richfaces.taglib.HashParamTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ </section>
+ </section>
+
+ <!--
<section
id="sect-Component_Reference-Functionality_extension-richgmap">
<title><sgmltag><rich:gmap></sgmltag></title>
<para>
@@ -26,6 +162,7 @@
Incomplete
</para>
</section>
+ -->
</chapter>
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Functions.xml
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Functions.xml 2011-04-05
16:00:15 UTC (rev 22374)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Functions.xml 2011-04-06
00:38:48 UTC (rev 22375)
@@ -7,88 +7,6 @@
Read this chapter for details on special functions for use with particular components.
Using JavaServer Faces Expression Language (<acronym>JSF</acronym>
<acronym>EL</acronym>), these functions can be accessed through the
<varname>data</varname> attribute of components. Refer to <xref
linkend="sect-Component_Reference-Events_and_JavaScript_interactions-data" />
for details on the <varname>data</varname> attribute.
</para>
- <section id="sect-Component_Reference-Functions-richcomponentControl">
- <title><sgmltag><rich:componentControl></sgmltag></title>
- <para>
- The <sgmltag><rich:componentControl></sgmltag> behavior
allows JavaScript API functions to be called on target components. The functions are
called after defined events are triggered on the component to with the
<sgmltag><rich:componentControl></sgmltag> behavior is attached.
Initialization variants and activation events can be customized, and parameters can be
passed to the target component.
- </para>
-
- <section
id="sect-Component_Reference-richcomponentControl-Basic_usage">
- <title>Basic usage</title>
- <para>
- The <varname>operation</varname> attribute is required to attach
JavaScript functions to the parent component, along with either the
<varname>target</varname> or <varname>selector</varname>
attributes. Use the <varname>operation</varname> attribute to specify the
JavaScript API function to perform. Use the <varname>target</varname>
attribute to define the <varname>id</varname> identifier of the target
component, or use the <varname>selector</varname> attribute to define a number
of target components through the use of valid jQuery selectors.
- </para>
- <para>
- Use the <varname>event</varname> attribute to specify the event that
triggers the JavaScript API function call if it is different from the default triggering
event for the parent component.
- </para>
- <example
id="exam-Component_Reference-richcomponentControl-richcomponentControl_basic_usage">
- <title><sgmltag><rich:componentControl></sgmltag>
basic usage</title>
- <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-richcomponentControl-richcomponentControl_basic_usage.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- <para>
- The example contains a single command button, which when clicked shows the modal
panel with the identifier <literal>ccModalPanelID</literal>.
- </para>
- </example>
- </section>
-
- <!--
- <section
id="sect-Component_Reference-richcomponentControl-Attaching_to_a_component">
- <title>Attaching to a component</title>
- <para>
- The <varname>attachTo</varname> attribute can be used to attach the event
to a component other than the parent component. If no
<varname>attachTo</varname> attribute is supplied, the
<sgmltag><rich:componentControl></sgmltag> component's
parent is used, as in <xref
linkend="exam-Component_Reference-richcomponentControl-richcomponentControl_basic_usage"
/>.
- </para>
- <example
id="exam-Component_Reference-richcomponentControl-Attaching_richcomponentControl_to_a_component">
- <title>Attaching
<sgmltag><rich:componentControl></sgmltag> to a
component</title>
- <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-richcomponentControl-Attaching_richcomponentControl_to_a_component.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- <para>
- In the example, the <literal>click</literal> event of the component with
the identifier <literal>ccCalendarID</literal> will trigger the
<literal>Expand</literal> operation for the component with the identifier
<literal>doExpandCalendarID</literal>.
- </para>
- </example>
- </section>
- -->
-
- <section
id="sect-Component_Reference-richcomponentControl-Passing_parameters_to_API_methods">
- <title>Passing parameters to API methods</title>
- <para>
- The operation can receive parameters through nested
<sgmltag><f:param></sgmltag> elements.
- </para>
- <example
id="exam-Component_Reference-richcomponentControl-Using_parameters">
- <title>Using parameters</title>
- <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-richcomponentControl-Using_parameters-1.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </example>
- </section>
-
- <section
id="sect-Component_Reference-richcomponentControl-Reference_data">
- <title>Reference data</title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>:
<classname>org.richfaces.ComponentControl</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlComponentControl</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>:
<classname>org.richfaces.ComponentControl</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>:
<classname>org.richfaces.ComponentControlRenderer</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>tag-class</parameter>:
<classname>org.richfaces.taglib.ComponentControlTag</classname>
- </para>
- </listitem>
- </itemizedlist>
- </section>
- </section>
-
<section id="sect-Component_Reference-Functions-richclientId">
<title><function>rich:clientId</function></title>
<para>
@@ -99,7 +17,7 @@
<section id="sect-Component_Reference-Functions-richcomponent">
<title><function>rich:component</function></title>
<para>
- The <function>rich:component('id')</function> function is a
shortcut for the equivalent
<code>#{rich:clientId('id')}.component</code> code. It returns the
UIComponent instance from the client, based on the passed server-side component identifier
(<code>'id'</code>). If the specified component identifier is not
found, <literal>null</literal> is returned instead.
+ The <function>rich:component('id')</function> function is
equivalent to the <code>RichFaces.$('clientId')</code> code. It
returns the client object instance based on the passed server-side component identifier
(<code>'id'</code>). If the specified component identifier is not
found, <literal>null</literal> is returned instead. The function can be used
to get an object from a component to call a JavaScript API function without using the
<sgmltag><rich:componentControl></sgmltag> component.
</para>
</section>
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Panels.xml
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Panels.xml 2011-04-05
16:00:15 UTC (rev 22374)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Panels.xml 2011-04-06
00:38:48 UTC (rev 22375)
@@ -557,7 +557,7 @@
<itemizedlist>
<listitem>
<para>
- Using the <sgmltag><rich:componentControl></sgmltag>
component. For details on the component, refer to <xref
linkend="sect-Component_Reference-Actions-richcomponentControl" />.
+ Using the <sgmltag><rich:componentControl></sgmltag>
component. For details on the component, refer to <xref
linkend="sect-Component_Reference-Functionality_extension-richcomponentControl"
/>.
</para>
</listitem>
<listitem>
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-04-05
16:00:15 UTC (rev 22374)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml 2011-04-06
00:38:48 UTC (rev 22375)
@@ -1695,13 +1695,6 @@
<section
id="sect-Component_Reference-Tables_and_grids-Table_filtering">
<title>Table filtering</title>
- <!-- In development notification -->
- <important>
- <title>Documentation in development</title>
- <para>
- This section is currently under development. Any features it describes may not be
available in the current release of RichFaces.
- </para>
- </important>
<!-- TODO: Not in Final -->
<!--
@@ -1754,7 +1747,7 @@
Use the <varname>filterValue</varname> attribute to point to an object
which holds the current filtering value for the column. The attribute can be used to
store filtering conditions in a session. Alternatively, use the
<varname>filterValue</varname> attribute when using the JavaScript API for
filtering. The attribute can store a value to pass as parameter to a JavaScript filter
method.
</para>
<example
id="exam-Component_Reference-Table_filtering-External_filtering">
- <title>External filtering</title>
+ <title>Filtering example</title>
<programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-Table_filtering-External_filtering.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
<para>
The example uses a filter expression on the first column and a filter method on the
second column.
@@ -1775,13 +1768,6 @@
<section id="sect-Component_Reference-Tables_and_grids-Table_sorting">
<title>Table sorting</title>
- <!-- In development notification -->
- <important>
- <title>Documentation in development</title>
- <para>
- This section is currently under development. Any features it describes may not be
available in the current release of RichFaces.
- </para>
- </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.
@@ -1837,7 +1823,7 @@
If using custom-defined rules for sorting, use the
<varname>comparator</varname> attribute instead. Set the
<varname>comparator</varname> attribute to point to your comparator method,
which will be used when sorting the data model.
</para>
<para>
- Bind the <varname>sortOrder</varname> attribute to bean properties to
manage the sorting order. The bean must handle all the sorting algorithms. <xref
linkend="exam-Component_Reference-Table_sorting-External_sorting" />
demonstrates table sorting using an external control.
+ Bind the <varname>sortOrder</varname> attribute to bean properties to
manage the sorting order. The bean must handle all the sorting algorithms. <xref
linkend="exam-Component_Reference-Table_sorting-Sorting" /> demonstrates
table sorting using an external control.
</para>
<example id="exam-Component_Reference-Table_sorting-Sorting">
<title>Sorting</title>
Added:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richhashParam-richhashParam.xml_sample
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richhashParam-richhashParam.xml_sample
(rev 0)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richhashParam-richhashParam.xml_sample 2011-04-06
00:38:48 UTC (rev 22375)
@@ -0,0 +1,13 @@
+<h:commandButton value="Show popup">
+ <rich:componentControl target="popupPanel"
operation="show">
+ <a4j:param noEscape="true" value="event" />
+ <rich:hashParam>
+ <f:param name="width" value="500" />
+ <f:param name="height" value="300" />
+ <f:param name="minWidth" value="300" />
+ <f:param name="minHeight" value="150" />
+ <a4j:param noEscape="true" name="left"
value="(jQuery(window).width()/2)-250" />
+ <a4j:param noEscape="true" name="top"
value="(jQuery(window).height()/2)-150" />
+ </rich:hashParam>
+ </rich:componentControl>
+</h:commandButton>