Author: SeanRogers
Date: 2010-09-28 01:57:06 -0400 (Tue, 28 Sep 2010)
New Revision: 19352
Added:
modules/docs/branches/M3_draft/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richautocompleteBehavior-Defining_suggestion_values.xml_sample
Modified:
modules/docs/branches/M3_draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml
modules/docs/branches/M3_draft/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richautocomplete-Defining_suggestion_values.xml_sample
Log:
Added rich:autocompleteBehavior
Modified:
modules/docs/branches/M3_draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml
===================================================================
---
modules/docs/branches/M3_draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml 2010-09-27
19:36:07 UTC (rev 19351)
+++
modules/docs/branches/M3_draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml 2010-09-28
05:57:06 UTC (rev 19352)
@@ -122,6 +122,9 @@
<para>
The <sgmltag><rich:autocomplete></sgmltag> component is an
auto-completing input-box with built-in Ajax capabilities. It supports client-side
suggestions, browser-like selection, and customization of the look and feel.
</para>
+ <para>
+ To attach an auto-completion behavior to other components, use the
<sgmltag><rich:autocompleteBehavior></sgmltag> behavior. Refer
to <xref
linkend="sect-Component_Reference-Rich_inputs-richautocompleteBehavior" />
for full details on the
<sgmltag><rich:autocompleteBehavior></sgmltag> behavior.
+ </para>
<figure
id="figu-Component_Reference-richautocomplete-richautocomplete">
<title><sgmltag><rich:autocomplete></sgmltag></title>
<mediaobject>
@@ -139,7 +142,7 @@
<section id="sect-Component_Reference-richautocomplete-Basic_usage">
<title>Basic usage</title>
<para>
- The <varname>value</varname> attribute stores the text entered by the
user for the auto-complete box. Suggestions shown in the auto-complete list can be
specified using the <varname>autocompleteList</varname> attribute, which
points to a collection of suggestions:
+ The <varname>value</varname> attribute stores the text entered by the
user for the auto-complete box. Suggestions shown in the auto-complete list can be
specified using the <varname>autocompleteMethod</varname> attribute, which
points to a collection of suggestions.
</para>
<example
id="exam-Component_Reference-richautocomplete-Defining_suggestion_values">
<title>Defining suggestion values</title>
@@ -228,6 +231,54 @@
</section>
</section>
+ <!--<rich:autocompleteBehavior>-->
+ <section
id="sect-Component_Reference-Rich_inputs-richautocompleteBehavior">
+ <title><sgmltag><rich:autocompleteBehavior></sgmltag></title>
+ <para>
+ The <sgmltag><rich:autocompleteBehavior></sgmltag> behavior
is an auto-completing list of input suggestions that can be attached to other components.
+ </para>
+ <para>
+ Use the <sgmltag><rich:autocomplete></sgmltag> component for
a standard auto-completing combo-box control. Refer to <xref
linkend="sect-Component_Reference-Rich_inputs-richautocomplete" /> for full
details on the <sgmltag><rich:autocomplete></sgmltag>
component.
+ </para>
+
+ <section
id="sect-Component_Reference-richautocompleteBehavior-Basic_usage">
+ <title>Basic usage</title>
+ <para>
+ Attach the <sgmltag><rich:autocompleteBehavior></sgmltag>
behavior as a sub-element to another component to provide auto-complete suggestions for
that component. Suggestions shown in the auto-complete list can be specified using the
<varname>autocompleteMethod</varname> attribute, which points to a collection
of suggestions. <xref
linkend="exam-Component_Reference-richautocompleteBehavior-Defining_suggestion_values"
/> demonstrates a
<sgmltag><rich:autocompleteBehavior></sgmltag> behavior attached
to a standard JSF <sgmltag><h:inputText></sgmltag> component.
+ </para>
+ <example
id="exam-Component_Reference-richautocompleteBehavior-Defining_suggestion_values">
+ <title>Defining suggestion values</title>
+ <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-richautocompleteBehavior-Defining_suggestion_values.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ </example>
+ </section>
+
+ <section
id="sect-Component_Reference-richautocompleteBehavior-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.richfaces.autocompleteBehavior</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlAutocompleteBehavior</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>org.richfaces.autocompleteBehavior</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>:
<classname>org.richfaces.taglib.autocompleteBehaviorTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ </section>
+
<!-- TODO not in M2 -->
<!--
<section id="sect-Component_Reference-Rich_inputs-richeditor">
Modified:
modules/docs/branches/M3_draft/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richautocomplete-Defining_suggestion_values.xml_sample
===================================================================
---
modules/docs/branches/M3_draft/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richautocomplete-Defining_suggestion_values.xml_sample 2010-09-27
19:36:07 UTC (rev 19351)
+++
modules/docs/branches/M3_draft/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richautocomplete-Defining_suggestion_values.xml_sample 2010-09-28
05:57:06 UTC (rev 19352)
@@ -1 +1 @@
-<rich:autocomplete value="#{bean.state}"
autocompleteList="#{bean.suggestions}" />
+<rich:autocomplete value="#{bean.state}"
autocompleteMethod="#{bean.suggestions}" />
Added:
modules/docs/branches/M3_draft/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richautocompleteBehavior-Defining_suggestion_values.xml_sample
===================================================================
---
modules/docs/branches/M3_draft/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richautocompleteBehavior-Defining_suggestion_values.xml_sample
(rev 0)
+++
modules/docs/branches/M3_draft/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richautocompleteBehavior-Defining_suggestion_values.xml_sample 2010-09-28
05:57:06 UTC (rev 19352)
@@ -0,0 +1,3 @@
+<h:inputText>
+ <rich:autocomplete value="#{bean.state}"
autocompleteMethod="#{bean.suggestions}" />
+</h:inputText>