Author: SeanRogers
Date: 2010-08-23 03:04:53 -0400 (Mon, 23 Aug 2010)
New Revision: 18922
Modified:
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Actions.xml
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Common_Ajax_attributes.xml
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Containers.xml
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Processing_management.xml
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Resources.xml
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Selection_and_ordering.xml
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Validation.xml
Log:
Updated with clearer sectioning
Modified:
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Actions.xml
===================================================================
---
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Actions.xml 2010-08-23
03:50:06 UTC (rev 18921)
+++
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Actions.xml 2010-08-23
07:04:53 UTC (rev 18922)
@@ -8,70 +8,80 @@
</para>
<section id="sect-Component_Reference-Actions-a4jactionParam">
<title><sgmltag><a4j:actionParam></sgmltag></title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>:
<classname>org.ajax4jsf.ActionParameter</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.HTMLActionParameter</classname>
- </para>
- </listitem>
- </itemizedlist>
<para>
The <sgmltag><a4j:actionParam></sgmltag> behavior combines
the functionality of the JavaServer Faces (<acronym>JSF</acronym>) components
<sgmltag><f:param></sgmltag> and
<sgmltag><f:actionListener></sgmltag>.
</para>
- <para>
- Basic usage of the <sgmltag><a4j:actionParam></sgmltag>
requires three main attributes:
- </para>
- <itemizedlist>
- <listitem>
+
+ <section id="sect-Component_Reference-a4jactionParam-Basic_usage">
+ <title>Basic usage</title>
+ <para>
+ Basic usage of the <sgmltag><a4j:actionParam></sgmltag>
requires three main attributes:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <varname>name</varname>, for the name of the parameter;
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <varname>value</varname>, for the initial value of the parameter; and
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <varname>assignTo</varname>, for defining the bean property. The
property will be updated if the parent command component performs an action event during
the <emphasis>Process Request</emphasis> phase.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <xref
linkend="exam-Component_Reference-a4jactionParam-a4jactionParam_example" />
shows a simple implementation along with the accompanying managed bean.
+ </para>
+ <example
id="exam-Component_Reference-a4jactionParam-a4jactionParam_example">
+ <title><sgmltag><a4j:actionParam></sgmltag>
example</title>
+ <programlisting language="XML" role="XML"><xi:include
href="extras/exam-Component_Reference-a4jactionParam-a4jactionParam_example.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude"
/></programlisting>
+ <programlisting language="Java" role="JAVA"><xi:include
href="extras/exam-Component_Reference-a4jactionParam-a4jactionParam_example.js"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude"
/></programlisting>
<para>
- <varname>name</varname>, for the name of the parameter;
+ When the <guibutton>Set name to Alex</guibutton> button is pressed, the
application sets the <varname>name</varname> parameter of the bean to
<literal>Alex</literal>, and displays the name in the output field.
</para>
- </listitem>
- <listitem>
+ </example>
+ </section>
+
+ <section
id="sect-Component_Reference-a4jactionParam-Interoperability">
+ <title>Interoperability</title>
+ <para>
+ The <sgmltag><a4j:actionParam></sgmltag> behavior can be
used with non-Ajax components in addition to Ajax components. In this way, data model
values can be updated without an JavaScript code on the server side.
+ </para>
+ <para>
+ The <varname>converter</varname> attribute can be used to specify how to
convert the value before it is submitted to the data model. The property is assigned the
new value during the <emphasis>Update Model</emphasis> phase.
+ </para>
+ <note>
+ <title>Validation failure</title>
<para>
- <varname>value</varname>, for the initial value of the parameter; and
+ If the validation of the form fails, the <emphasis>Update
Model</emphasis> phase will be skipped and the property will not be updated.
</para>
- </listitem>
- <listitem>
- <para>
- <varname>assignTo</varname>, for defining the bean property. The
property will be updated if the parent command component performs an action event during
the <emphasis>Process Request</emphasis> phase.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <xref
linkend="exam-Component_Reference-a4jactionParam-a4jactionParam_example" />
shows a simple implementation along with the accompanying managed bean. When the
<guibutton>Set name to Alex</guibutton> button is pressed, the application
sets the <varname>name</varname> parameter of the bean to
<literal>Alex</literal>, and displays the name in the output field.
- </para>
- <example
id="exam-Component_Reference-a4jactionParam-a4jactionParam_example">
- <title><sgmltag><a4j:actionParam></sgmltag>
example</title>
-
-<programlisting language="XML" role="XML">
-<xi:include
href="extras/exam-Component_Reference-a4jactionParam-a4jactionParam_example.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
-
-<programlisting language="Java" role="JAVA">
-<xi:include
href="extras/exam-Component_Reference-a4jactionParam-a4jactionParam_example.js"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
- </example>
- <para>
- The <sgmltag><a4j:actionParam></sgmltag> behavior can be
used with non-Ajax components in addition to Ajax components. In this way, data model
values can be updated without an JavaScript code on the server side.
- </para>
- <para>
- The <varname>converter</varname> attribute can be used to specify how to
convert the value before it is submitted to the data model. The property is assigned the
new value during the <emphasis>Update Model</emphasis> phase.
- </para>
- <note>
- <title>Validation failure</title>
+ </note>
<para>
- If the validation of the form fails, the <emphasis>Update
Model</emphasis> phase will be skipped and the property will not be updated.
+ Variables from JavaScript functions can be used for the
<varname>value</varname> attribute. In such an implementation, the
<varname>noEscape</varname> attribute should be set to
<literal>true</literal>. Using
<code>noEscape="true"</code>, the
<varname>value</varname> attribute can contain any JavaScript expression or
JavaScript function invocation, and the result will be sent to the server as the
<varname>value</varname> attribute.
</para>
- </note>
- <para>
- Variables from JavaScript functions can be used for the
<varname>value</varname> attribute. In such an implementation, the
<varname>noEscape</varname> attribute should be set to
<literal>true</literal>. Using
<code>noEscape="true"</code>, the
<varname>value</varname> attribute can contain any JavaScript expression or
JavaScript function invocation, and the result will be sent to the server as the
<varname>value</varname> attribute.
- </para>
+ </section>
+
+ <section id="sect-Component_Reference-a4jactionParam-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.ajax4jsf.ActionParameter</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.HTMLActionParameter</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
</section>
<!-- FIXME not in M2 -->
@@ -109,28 +119,9 @@
<section id="sect-Component_Reference-Actions-a4jcommandButton">
<title><sgmltag><a4j:commandButton></sgmltag></title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>:
<classname>org.ajax4jsf.CommandButton</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.HtmlAjaxCommandButton</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>:
<classname>javax.faces.Command</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.components.AjaxCommandButtonRenderer</classname>
- </para>
- </listitem>
- </itemizedlist>
+ <para>
+ The <sgmltag><a4j:commandButton></sgmltag> is similar to the
JavaServer Faces (<acronym>JSF</acronym>) component
<sgmltag><h:commandButton></sgmltag>, but additionally includes
Ajax support. When the command button is clicked it submits an Ajax form, and when a
response is received the command button can be dynamically rendered.
+ </para>
<figure
id="figu-Component_Reference-a4jcommandButton-a4jcommandButton">
<title><sgmltag><a4j:commandButton></sgmltag></title>
<mediaobject>
@@ -144,44 +135,53 @@
</textobject>
</mediaobject>
</figure>
- <para>
- The <sgmltag><a4j:commandButton></sgmltag> is similar to the
JavaServer Faces (<acronym>JSF</acronym>) component
<sgmltag><h:commandButton></sgmltag>, but additionally includes
Ajax support. When the command button is clicked it generates an Ajax form submit, and
when a response is received the command button can be dynamically rendered.
- </para>
- <para>
- The <sgmltag><a4j:commandButton></sgmltag> requires only the
<varname>value</varname> and <varname>render</varname> attributes
to function. The <varname>value</varname> attribute specifies the text of the
button and the <varname>render</varname> attribute specifies which areas are
to be updated. The <sgmltag><a4j:commandButton></sgmltag> uses
the <varname>onclick</varname> event instead of the
<varname>onsubmit</varname> event, but otherwise uses all common Ajax
attributes as listed in <xref
linkend="chap-Component_Reference-Common_Ajax_attributes" />.
- </para>
- <note>
- <title>Set
<code>disabledDefault="true"</code></title>
+
+ <section id="sect-Component_Reference-a4jcommandButton-Basic_usage">
+ <title>Basic usage</title>
<para>
- When attaching a JavaScript function to a
<sgmltag><a4j:commandButton></sgmltag> with the help of a
<sgmltag><rich:componentControl></sgmltag>, do not use the
<varname>attachTo</varname> attribute of
<sgmltag><rich:componentControl></sgmltag>. The attribute adds
event handlers using <classname>Event.observe</classname> but
<sgmltag><a4j:commandButton></sgmltag> does not include this
event.
+ The <sgmltag><a4j:commandButton></sgmltag> requires only
the <varname>value</varname> and <varname>render</varname>
attributes to function. The <varname>value</varname> attribute specifies the
text of the button and the <varname>render</varname> attribute specifies which
areas are to be updated. The
<sgmltag><a4j:commandButton></sgmltag> uses the
<varname>onclick</varname> event instead of the
<varname>onsubmit</varname> event, but otherwise uses all common Ajax
attributes as listed in <xref
linkend="chap-Component_Reference-Common_Ajax_attributes" />.
</para>
- </note>
+ <note>
+ <title>Set
<code>disabledDefault="true"</code></title>
+ <para>
+ When attaching a JavaScript function to a
<sgmltag><a4j:commandButton></sgmltag> with the help of a
<sgmltag><rich:componentControl></sgmltag>, do not use the
<varname>attachTo</varname> attribute of
<sgmltag><rich:componentControl></sgmltag>. The attribute adds
event handlers using <classname>Event.observe</classname> but
<sgmltag><a4j:commandButton></sgmltag> does not include this
event.
+ </para>
+ </note>
+ </section>
+
+ <section
id="sect-Component_Reference-a4jcommandButton-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.ajax4jsf.CommandButton</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.HtmlAjaxCommandButton</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>javax.faces.Command</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.components.AjaxCommandButtonRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
</section>
<section id="sect-Component_Reference-Actions-a4jcommandLink">
<title><sgmltag><a4j:commandLink></sgmltag></title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>:
<classname>org.ajax4jsf.CommandLink</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.HtmlAjaxCommandLink</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>:
<classname>javax.faces.Command</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.components.AjaxCommandLinkRenderer</classname>
- </para>
- </listitem>
- </itemizedlist>
+ <para>
+ The <sgmltag><a4j:commandLink></sgmltag> is similar to the
JavaServer Faces (<acronym>JSF</acronym>) component
<sgmltag><h:commandLink></sgmltag>, but additionally includes
Ajax support. When the command link is clicked it generates an Ajax form submit, and when
a response is received the command link can be dynamically rendered.
+ </para>
<figure id="figu-Component_Reference-a4jcommandLink-a4jcommandLink">
<title><sgmltag><a4j:commandLink></sgmltag></title>
<mediaobject>
@@ -195,132 +195,166 @@
</textobject>
</mediaobject>
</figure>
- <para>
- The <sgmltag><a4j:commandLink></sgmltag> is similar to the
JavaServer Faces (<acronym>JSF</acronym>) component
<sgmltag><h:commandLink></sgmltag>, but additionally includes
Ajax support. When the command link is clicked it generates an Ajax form submit, and when
a response is received the command link can be dynamically rendered.
- </para>
- <para>
- The <sgmltag><a4j:commandLink></sgmltag> requires only the
<varname>value</varname> and <varname>render</varname> attributes
to function. The <varname>value</varname> attribute specifies the text of the
link and the <varname>render</varname> attribute specifies which areas are to
be updated. The <sgmltag><a4j:commandLink></sgmltag> uses the
<varname>onclick</varname> event instead of the
<varname>onsubmit</varname> event, but otherwise uses all common Ajax
attributes as listed in <xref
linkend="chap-Component_Reference-Common_Ajax_attributes" />.
- </para>
+
+ <section id="sect-Component_Reference-a4jcommandLink-Basic_usage">
+ <title>Basic usage</title>
+ <para>
+ The <sgmltag><a4j:commandLink></sgmltag> requires only the
<varname>value</varname> and <varname>render</varname> attributes
to function. The <varname>value</varname> attribute specifies the text of the
link and the <varname>render</varname> attribute specifies which areas are to
be updated. The <sgmltag><a4j:commandLink></sgmltag> uses the
<varname>onclick</varname> event instead of the
<varname>onsubmit</varname> event, but otherwise uses all common Ajax
attributes as listed in <xref
linkend="chap-Component_Reference-Common_Ajax_attributes" />.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-a4jcommandLink-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.ajax4jsf.CommandLink</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.HtmlAjaxCommandLink</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>javax.faces.Command</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.components.AjaxCommandLinkRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
<section id="sect-Component_Reference-Actions-richcomponentControl">
<title><sgmltag><rich:componentControl></sgmltag></title>
- <remark>The following reference data is taken from the old
<sgmltag><rich:componentControl></sgmltag> reference. The
details may be different now that the component is part of the
<classname>a4j</classname> tag library.</remark>
- <itemizedlist>
- <listitem>
+ <para>
+ The <sgmltag><rich:componentControl></sgmltag> allows
JavaScript API functions to be called on components after defined events. 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>event</varname>, <varname>for</varname>, and
<varname>operation</varname> attributes are all that is required to attach
JavaScript functions to the parent component. The <varname>event</varname>
attribute specifies the event that triggers the JavaScript API function call. The
<varname>for</varname> attribute defines the target component, and the
<varname>operation</varname> attribute specifies the JavaScript function to
perform.
+ </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>
- <parameter>component-type</parameter>:
<classname>org.richfaces.ComponentControl</classname>
+ The example contains a single command button, which when clicked shows the modal
panel with the identifier <literal>ccModalPanelID</literal>.
</para>
- </listitem>
- <listitem>
+ </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>
- <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlComponentControl</classname>
+ In the example, the <literal>onclick</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>
- </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>
- <para>
- The <sgmltag><rich:componentControl></sgmltag> allows
JavaScript API functions to be called on components after defined events. Initialization
variants and activation events can be customized, and parameters can be passed to the
target component.
- </para>
- <para>
- The <varname>event</varname>, <varname>for</varname>, and
<varname>operation</varname> attributes are all that is required to attach
JavaScript functions to the parent component. The <varname>event</varname>
attribute specifies the event that triggers the JavaScript API function call. The
<varname>for</varname> attribute defines the target component, and the
<varname>operation</varname> attribute specifies the JavaScript function to
perform.
- </para>
- <example
id="exam-Component_Reference-richcomponentControl-richcomponentControl_basic_usage">
- <title>rich:componentControl basic usage</title>
-
-<programlisting language="XML"
role="XML"><h:commandButton value="Show Modal
Panel">
- <!--componentControl is attached to the commandButton-->
- <rich:componentControl for="ccModalPanelID"
event="onclick" operation="show"/>
-</h:commandButton>
-</programlisting>
+ </example>
+ </section>
+
+ <section
id="sect-Component_Reference-richcomponentControl-Parameters_and_JavaScript">
+ <title>Parameters and JavaScript</title>
<para>
- The example contains a single command button, which when clicked shows the modal
panel with the identifier <literal>ccModalPanelID</literal>.
+ The operation can receive parameters either through the
<varname>params</varname> attribute, or by using
<sgmltag><f:param></sgmltag> elements.
</para>
- </example>
- <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"><rich:componentControl
attachTo="doExpandCalendarID" event="onclick"
operation="Expand" for="ccCalendarID" />
-</programlisting>
+ <example
id="exam-Component_Reference-richcomponentControl-Using_parameters">
+ <title>Using parameters</title>
+ <variablelist>
+ <varlistentry>
+ <term>The <varname>params</varname> attribute</term>
+ <listitem>
+ <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-richcomponentControl-Using_parameters-0.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><sgmltag><f:param></sgmltag>
elements</term>
+ <listitem>
+ <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>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </example>
<para>
- In the example, the <literal>onclick</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>.
+ The <varname>name</varname> attribute can be used to define a normal
JavaScript function that triggers the specified operation on the target component.
</para>
- </example>
- <para>
- The operation can receive parameters either through the
<varname>params</varname> attribute, or by using
<sgmltag><f:param></sgmltag> elements.
- </para>
- <example
id="exam-Component_Reference-richcomponentControl-Using_parameters">
- <title>Using parameters</title>
+ </section>
+
+
+ <section id="sect-Component_Reference-richcomponentControl-Timing">
+ <title>Timing</title>
+ <para>
+ The <varname>attachTiming</varname> attribute can determine the page
loading phase during which the
<sgmltag><rich:componentControl></sgmltag> is attached to the
source component:
+ </para>
<variablelist>
<varlistentry>
- <term>The <varname>params</varname> attribute</term>
+ <term><literal>immediate</literal></term>
<listitem>
-
-<programlisting language="XML"
role="XML"><rich:componentControl name="func"
event="onRowClick" for="menu" operation="show"
params="#{car.model}"/>
-</programlisting>
+ <para>
+ attached during execution of the script.
+ </para>
</listitem>
</varlistentry>
<varlistentry>
- <term><sgmltag><f:param></sgmltag>
elements</term>
+ <term><literal>onavailable</literal></term>
<listitem>
-
-<programlisting language="XML"
role="XML"><rich:componentControl event="onRowClick"
for="menu" operation="show">
- <f:param value="#{car.model}" name="model"/>
-</rich:componentControl>
-</programlisting>
+ <para>
+ attached after the target component is initialized.
+ </para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><literal>onload</literal></term>
+ <listitem>
+ <para>
+ attached after the page is loaded.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
- </example>
- <para>
- The <varname>name</varname> attribute can be used to define a normal
JavaScript function that triggers the specified operation on the target component.
- </para>
- <para>
- The <varname>attachTiming</varname> attribute can determine the page
loading phase during which the
<sgmltag><rich:componentControl></sgmltag> is attached to the
source component:
- </para>
- <variablelist>
- <varlistentry>
- <term><literal>immediate</literal></term>
+ </section>
+
+ <section
id="sect-Component_Reference-richcomponentControl-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
<listitem>
<para>
- attached during execution of the script.
+ <parameter>component-type</parameter>:
<classname>org.richfaces.ComponentControl</classname>
</para>
</listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>onavailable</literal></term>
<listitem>
<para>
- attached after the target component is initialized.
+ <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlComponentControl</classname>
</para>
</listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>onload</literal></term>
<listitem>
<para>
- attached after the page is loaded.
+ <parameter>component-family</parameter>:
<classname>org.richfaces.ComponentControl</classname>
</para>
</listitem>
- </varlistentry>
- </variablelist>
+ <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>
<!-- TODO not in M2 -->
@@ -370,146 +404,149 @@
<section id="sect-Component_Reference-Actions-a4jjsFunction">
<title><sgmltag><a4j:jsFunction></sgmltag></title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>:
<classname>org.ajax4jsf.Function</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.HtmlajaxFunction</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>:
<classname>org.ajax4jsf.components.ajaxFunction</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.components.ajaxFunctionRenderer</classname>
- </para>
- </listitem>
- </itemizedlist>
<para>
The <sgmltag><a4j:jsFunction></sgmltag> component allows
Ajax requests to be performed directly from JavaScript code, and server-side data to be
invoked and returned in JavaScript Object Notation (<acronym>JSON</acronym>)
format to use in client-side JavaScript calls.
</para>
- <para>
- The <sgmltag><a4j:jsFunction></sgmltag> component has all
the common Ajax action attributes as listed in <xref
linkend="chap-Component_Reference-Common_Ajax_attributes" />; the
<varname>action</varname> and <varname>actionListener</varname>
attributes can be invoked and parts of the page can be re-rendered after a successful call
to the JavaScript function. <xref
linkend="exam-Component_Reference-a4jjsFunction-a4jjsFunction_example" />
shows how an Ajax request can be initiated from the JavaScript and a partial page update
performed. The JavaScript function can be invoked with the data returned by the Ajax
response.
- </para>
- <example
id="exam-Component_Reference-a4jjsFunction-a4jjsFunction_example">
- <title><sgmltag><a4j:jsFunction></sgmltag>
example</title>
-
-<programlisting language="XML" role="XML">
-<xi:include
href="extras/exam-Component_Reference-a4jjsFunction-a4jjsFunction_example.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
- </example>
- <para>
- The <sgmltag><a4j:jsFunction></sgmltag> component allows the
use of the <sgmltag><a4j:actionParam></sgmltag> component or the
JavaServer Faces <sgmltag><f:param></sgmltag> component to pass
any number of parameters for the JavaScript function.
- </para>
- <para>
- The <sgmltag><a4j:jsFunction></sgmltag> component is similar
to the <sgmltag><a4j:commandButton></sgmltag> component, but it
can be activated from the JavaScript code. This allows some server-side functionality to
be invoked and the returned data to subsequently be used in a JavaScript function invoked
by the <varname>oncomplete</varname> event attribute. In this way, the
<sgmltag><a4j:jsFunction></sgmltag> component can be used
instead of the <sgmltag><a4j:commandButton></sgmltag>
component.
- </para>
+
+ <section id="sect-Component_Reference-a4jjsFunction-Basic_usage">
+ <title>Basic usage</title>
+ <para>
+ The <sgmltag><a4j:jsFunction></sgmltag> component has all
the common Ajax action attributes as listed in <xref
linkend="chap-Component_Reference-Common_Ajax_attributes" />; the
<varname>action</varname> and <varname>actionListener</varname>
attributes can be invoked and parts of the page can be re-rendered after a successful call
to the JavaScript function. <xref
linkend="exam-Component_Reference-a4jjsFunction-a4jjsFunction_example" />
shows how an Ajax request can be initiated from the JavaScript and a partial page update
performed. The JavaScript function can be invoked with the data returned by the Ajax
response.
+ </para>
+ <example
id="exam-Component_Reference-a4jjsFunction-a4jjsFunction_example">
+ <title><sgmltag><a4j:jsFunction></sgmltag>
example</title>
+ <programlisting language="XML" role="XML"><xi:include
href="extras/exam-Component_Reference-a4jjsFunction-a4jjsFunction_example.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude"
/></programlisting>
+ </example>
+ </section>
+
+ <section
id="sect-Component_Reference-a4jjsFunction-Parameters_and_JavaScript">
+ <title>Parameters and JavaScript</title>
+ <para>
+ The <sgmltag><a4j:jsFunction></sgmltag> component allows
the use of the <sgmltag><a4j:actionParam></sgmltag> component or
the JavaServer Faces <sgmltag><f:param></sgmltag> component to
pass any number of parameters for the JavaScript function.
+ </para>
+ <para>
+ The <sgmltag><a4j:jsFunction></sgmltag> component is
similar to the <sgmltag><a4j:commandButton></sgmltag> component,
but it can be activated from the JavaScript code. This allows some server-side
functionality to be invoked and the returned data to subsequently be used in a JavaScript
function invoked by the <varname>oncomplete</varname> event attribute. In this
way, the <sgmltag><a4j:jsFunction></sgmltag> component can be
used instead of the <sgmltag><a4j:commandButton></sgmltag>
component.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-a4jjsFunction-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.ajax4jsf.Function</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.HtmlajaxFunction</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>org.ajax4jsf.components.ajaxFunction</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.components.ajaxFunctionRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
<section id="sect-Component_Reference-Actions-a4jpoll">
<title><sgmltag><a4j:poll></sgmltag></title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>:
<classname>org.ajax4jsf.Poll</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.AjaxPoll</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>:
<classname>org.ajax4jsf.components.AjaxPoll</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.components.AjaxPollRenderer</classname>
- </para>
- </listitem>
- </itemizedlist>
<para>
The <sgmltag><a4j:poll></sgmltag> component allows
periodical sending of Ajax requests to the server. It is used for repeatedly updating a
page at specific time intervals.
</para>
- <para>
- The <varname>interval</varname> attribute specifies the time in
milliseconds between requests. The default for this value is 1000 ms (1 second).
- </para>
- <para>
- The <varname>timeout</varname> attribute defines the response waiting time
in milliseconds. If a response isn't received within the timeout period, the
connection is aborted and the next request is sent. By default, the timeout is not set.
- </para>
- <para>
- The <sgmltag><a4j:poll></sgmltag> component can be enabled
and disabled using the <varname>enabled</varname> attribute. Using Expression
Language (<acronym>EL</acronym>), the <varname>enabled</varname>
attribute can point to a bean property to apply a particular attribute value.
- </para>
+
+ <section id="sect-Component_Reference-a4jpoll-Timing_options">
+ <title>Timing options</title>
+ <para>
+ The <varname>interval</varname> attribute specifies the time in
milliseconds between requests. The default for this value is 1000 ms (1 second).
+ </para>
+ <para>
+ The <varname>timeout</varname> attribute defines the response waiting
time in milliseconds. If a response isn't received within the timeout period, the
connection is aborted and the next request is sent. By default, the timeout is not set.
+ </para>
+ <para>
+ The <sgmltag><a4j:poll></sgmltag> component can be enabled
and disabled using the <varname>enabled</varname> attribute. Using Expression
Language (<acronym>EL</acronym>), the <varname>enabled</varname>
attribute can point to a bean property to apply a particular attribute value.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-a4jpoll-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.ajax4jsf.Poll</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.AjaxPoll</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>org.ajax4jsf.components.AjaxPoll</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.components.AjaxPollRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
<section id="sect-Component_Reference-Actions-a4jpush">
<title><sgmltag><a4j:push></sgmltag></title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>:
<classname>org.ajax4jsf.Push</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.AjaxPush</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>:
<classname>org.ajax4jsf.components.AjaxPush</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.components.AjaxPushRenderer</classname>
- </para>
- </listitem>
- </itemizedlist>
<para>
The <sgmltag><a4j:push></sgmltag> component periodically
performs an Ajax request to the server, simulating "push" functionality. While
it is not strictly pushing updates, the request is made to minimal code only, not to the
<acronym>JSF</acronym> tree, checking for the presence of new messages in the
queue. The request registers <classname>EventListener</classname>, which
receives messages about events, but does not poll registered beans. If a message exists, a
complete request is performed. This is different from the
<sgmltag><a4j:poll></sgmltag> component, which performs a full
request at every interval.
</para>
- <para>
- The <varname>interval</varname> attribute specifies the time in
milliseconds between checking for messages. The default for this value is 1000 ms (1
second). It is possible to set the interval value to <literal>0</literal>, in
which case it is constantly checking for new messages.
- </para>
- <para>
- The <varname>timeout</varname> attribute defines the response waiting time
in milliseconds. If a response isn't received within the timeout period, the
connection is aborted and the next request is sent. By default, the timeout is not set. In
combination with the <varname>interval</varname> attribute, checks for the
queue state can short polls or long connections.
- </para>
+
+ <section id="sect-Component_Reference-a4jpush-Timing_options">
+ <title>Timing options</title>
+ <para>
+ The <varname>interval</varname> attribute specifies the time in
milliseconds between checking for messages. The default for this value is 1000 ms (1
second). It is possible to set the interval value to <literal>0</literal>, in
which case it is constantly checking for new messages.
+ </para>
+ <para>
+ The <varname>timeout</varname> attribute defines the response waiting
time in milliseconds. If a response isn't received within the timeout period, the
connection is aborted and the next request is sent. By default, the timeout is not set. In
combination with the <varname>interval</varname> attribute, checks for the
queue state can short polls or long connections.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-a4jpush-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.ajax4jsf.Push</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.AjaxPush</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>org.ajax4jsf.components.AjaxPush</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.components.AjaxPushRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
<section id="sect-Component_Reference-Actions-a4jajax">
<title><sgmltag><a4j:ajax></sgmltag></title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>:
<classname>org.ajax4jsf.Ajax</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.HtmlAjaxSupport</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>:
<classname>org.ajax4jsf.Ajax</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.components.AjaxSupportRenderer</classname>
- </para>
- </listitem>
- </itemizedlist>
<para>
The <sgmltag><a4j:ajax></sgmltag> component allows Ajax
capability to be added to any non-Ajax component. It is placed as a direct child to the
component that requires Ajax support. The
<sgmltag><a4j:ajax></sgmltag> component uses the common
attributes listed in <xref
linkend="chap-Component_Reference-Common_Ajax_attributes" />.
</para>
@@ -521,15 +558,34 @@
</note>
<example id="exam-Component_Reference-a4jajax-a4jajax_example">
<title><sgmltag><a4j:ajax></sgmltag>
example</title>
-
-<programlisting language="XML" role="XML"><h:panelGrid
columns="2">
- <h:inputText id="myinput"
value="#{userBean.name}">
- <a4j:ajax event="onkeyup" reRender="outtext"
/>
- </h:inputText>
- <h:outputText id="outtext" value="#{userBean.name}"
/>
-</h:panelGrid>
-</programlisting>
+ <programlisting language="XML" role="XML"><xi:include
href="extras/exam-Component_Reference-a4jajax-a4jajax_example.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude"
/></programlisting>
</example>
+
+ <section id="sect-Component_Reference-a4jajax-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.ajax4jsf.Ajax</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.HtmlAjaxSupport</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>org.ajax4jsf.Ajax</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.components.AjaxSupportRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
</chapter>
Modified:
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Common_Ajax_attributes.xml
===================================================================
---
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Common_Ajax_attributes.xml 2010-08-23
03:50:06 UTC (rev 18921)
+++
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Common_Ajax_attributes.xml 2010-08-23
07:04:53 UTC (rev 18922)
@@ -18,23 +18,7 @@
</para>
<example id="exam-Component_Reference-render-render_example">
<title>render example</title>
-
-<programlisting language="XML" role="XML">
-<h:form id="form1">
- <a4j:commandButton value="Basic reference" render="infoBlock,
infoBlock2" />
- <a4j:commandButton value="Specific reference"
render=":infoBlock,:sv:infoBlock2" />
-</h:form>
-
-<h:panelGrid id="infoBlock">
- ...
-</h:panelGrid>
-
-<f:subview id="sv">
- <h:panelGrid id="infoBlock2">
- ...
- </h:panelGrid>
-</f:subview>
-</programlisting>
+ <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-render-render_example.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
</example>
<para>
The value of the <varname>render</varname> attribute can also be an
expression written using JavaServer Faces' Expression Language
(<acronym>EL</acronym>); this can either be a <type>Set</type>,
<type>Collection</type>, <type>Array</type>, or
<type>String</type>.
@@ -70,21 +54,7 @@
</para>
<example id="exam-Component_Reference-limitRender-Rendering_example">
<title>Rendering example</title>
-
-<programlisting language="XML" role="XML">
-<h:form id="form1">
- <a4j:commandButton value="Normal rendering"
render="infoBlock" />
- <a4j:commandButton value="Limited rendering"
render="infoBlock" limitRender="true" />
-</h:form>
-
-<h:panelGrid id="infoBlock">
- ...
-</h:panelGrid>
-
-<a4j:outputPanel ajaxRendered="true">
- <h:messages />
-</a4j:outputPanel>
-</programlisting>
+ <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-limitRender-Rendering_example.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
</example>
</section>
@@ -230,10 +200,7 @@
</para>
<example id="exam-Component_Reference-data-Data_reference_example">
<title>Data reference example</title>
-
-<programlisting language="XML" role="XML">
-<a4j:commandButton value="Update" data="#{userBean.name}"
oncomplete="showTheName(data.name)" />
-</programlisting>
+ <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-data-Data_reference_example.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
</example>
</section>
Modified:
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Containers.xml
===================================================================
---
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Containers.xml 2010-08-23
03:50:06 UTC (rev 18921)
+++
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Containers.xml 2010-08-23
07:04:53 UTC (rev 18922)
@@ -59,110 +59,117 @@
<section id="sect-Component_Reference-Containers-a4jinclude">
<title><sgmltag><a4j:include></sgmltag></title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>:
<classname>org.ajax4jsf.Include</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.Include</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>:
<classname>javax.faces.Output</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.components.AjaxIncludeRenderer</classname>
- </para>
- </listitem>
- </itemizedlist>
<para>
The <sgmltag><a4j:include></sgmltag> component allows one
view to be included as part of another page. This is useful for applications where
multiple views might appear on the one page, with navigation between the views. Views can
use partial page navigation in Ajax mode, or standard <acronym>JSF</acronym>
navigation for navigation between views.
</para>
- <para>
- The <varname>viewId</varname> attribute is required to reference the
resource that will be included as a view on the page. It uses a full context-relative path
to point to the resource, similar to the paths used for the
<sgmltag><from-view-id></sgmltag> and
<sgmltag><to-view-id></sgmltag> tags in the
<filename>faces-config.xml</filename> <acronym>JSF</acronym>
navigation rules.
- </para>
- <example
id="exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude">
- <title>A wizard using
<sgmltag><a4j:include></sgmltag></title>
+
+ <section id="sect-Component_Reference-a4jinclude-Basic_usage">
+ <title>Basic usage</title>
<para>
- The page uses <sgmltag><a4j:include></sgmltag> to include
the first step of the wizard:
+ The <varname>viewId</varname> attribute is required to reference the
resource that will be included as a view on the page. It uses a full context-relative path
to point to the resource, similar to the paths used for the
<sgmltag><from-view-id></sgmltag> and
<sgmltag><to-view-id></sgmltag> tags in the
<filename>faces-config.xml</filename> <acronym>JSF</acronym>
navigation rules.
</para>
-
-<programlisting language="XML" role="XML">
-<xi:include
href="extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-0.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
- <para>
- The first step is fully contained in a separate file,
<filename>wstep1.xhtml</filename>. Subsequent steps are set up similarly with
additional <guibutton>Previous</guibutton> buttons.
- </para>
-
-<programlisting language="XML" role="XML">
-<xi:include
href="extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-1.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
- <para>
- The navigation is defined in the <filename>faces-config.xml</filename>
configuration file:
- </para>
-
-<programlisting language="XML" role="XML">
-<xi:include
href="extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-2.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
- </example>
- </section>
-
- <section id="sect-Component_Reference-Containers-a4joutputPanel">
- <title><sgmltag><a4j:outputPanel></sgmltag></title>
- <itemizedlist>
- <listitem>
+ <example
id="exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude">
+ <title>A wizard using
<sgmltag><a4j:include></sgmltag></title>
<para>
- <parameter>component-type</parameter>:
<classname>org.ajax4jsf.OutputPanel</classname>
+ The page uses <sgmltag><a4j:include></sgmltag> to include
the first step of the wizard:
</para>
- </listitem>
- <listitem>
+ <programlisting language="XML" role="XML"><xi:include
href="extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-0.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude"
/></programlisting>
<para>
- <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.HtmlAjaxOutputPanel</classname>
+ The first step is fully contained in a separate file,
<filename>wstep1.xhtml</filename>. Subsequent steps are set up similarly with
additional <guibutton>Previous</guibutton> buttons.
</para>
- </listitem>
- <listitem>
+ <programlisting language="XML" role="XML"><xi:include
href="extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-1.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude"
/></programlisting>
<para>
- <parameter>component-family</parameter>:
<classname>javax.faces.Panel</classname>
+ The navigation is defined in the <filename>faces-config.xml</filename>
configuration file:
</para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.components.AjaxOutputPanelRenderer</classname>
- </para>
- </listitem>
- </itemizedlist>
+ <programlisting language="XML" role="XML"><xi:include
href="extras/exam-Component_Reference-a4jinclude-A_wizard_using_a4jinclude-2.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude"
/></programlisting>
+ </example>
+ </section>
+
+ <section id="sect-Component_Reference-a4jinclude-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.ajax4jsf.Include</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.Include</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>javax.faces.Output</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.components.AjaxIncludeRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ </section>
+
+ <section id="sect-Component_Reference-Containers-a4joutputPanel">
+ <title><sgmltag><a4j:outputPanel></sgmltag></title>
<para>
The <sgmltag><a4j:outputPanel></sgmltag> component is used
to group together components in to update them as a whole, rather than having to specify
the components individually.
</para>
- <para>
- The <varname>layout</varname> attribute can be used to determine how the
component is rendered in <acronym>HTML</acronym>:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <code>layout="inline"</code> is the default behavior, which
will render the component as a pair of <sgmltag><span></sgmltag>
tags containing the child components.
- </para>
- </listitem>
- <listitem>
- <para>
- <code>layout="block"</code> will render the component as a
pair of <sgmltag><div></sgmltag> tags containing the child
components, which will use any defined <sgmltag><div></sgmltag>
element styles.
- </para>
- </listitem>
- <listitem>
- <para>
- <code>layout="none"</code> will render the component as a pair
of <sgmltag><span></sgmltag> tags with an identifier equal to
that of a child component. If the child component is rendered then the
<sgmltag><span></sgmltag> are not included, leaving no markup
representing the <sgmltag><a4j:outputPanel></sgmltag> in
<acronym>HTML</acronym>.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- Setting <code>ajaxRendered="true"</code> will cause the
<sgmltag><a4j:outputPanel></sgmltag> to be updated with each
Ajax response for the page, even when not listed explicitly by the requesting component.
This can in turn be overridden by specific attributes on any requesting components.
- </para>
+
+ <section
id="sect-Component_Reference-a4joutputPanel-Panel_appearance">
+ <title>Panel appearance</title>
+ <para>
+ The <varname>layout</varname> attribute can be used to determine how the
component is rendered in <acronym>HTML</acronym>:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <code>layout="inline"</code> is the default behavior, which
will render the component as a pair of <sgmltag><span></sgmltag>
tags containing the child components.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>layout="block"</code> will render the component as a
pair of <sgmltag><div></sgmltag> tags containing the child
components, which will use any defined <sgmltag><div></sgmltag>
element styles.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>layout="none"</code> will render the component as a
pair of <sgmltag><span></sgmltag> tags with an identifier equal
to that of a child component. If the child component is rendered then the
<sgmltag><span></sgmltag> are not included, leaving no markup
representing the <sgmltag><a4j:outputPanel></sgmltag> in
<acronym>HTML</acronym>.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Setting <code>ajaxRendered="true"</code> will cause the
<sgmltag><a4j:outputPanel></sgmltag> to be updated with each
Ajax response for the page, even when not listed explicitly by the requesting component.
This can in turn be overridden by specific attributes on any requesting components.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-a4joutputPanel-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.ajax4jsf.OutputPanel</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.HtmlAjaxOutputPanel</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>javax.faces.Panel</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.components.AjaxOutputPanelRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
<!-- TODO not in M2 -->
@@ -225,34 +232,38 @@
<section id="sect-Component_Reference-Containers-a4jregion">
<title><sgmltag><a4j:region></sgmltag></title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>:
<classname>org.ajax4jsf.AjaxRegion</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.HtmlAjaxRegion</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>:
<classname>org.ajax4jsf.AjaxRegion</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.components.AjaxRegionRenderer</classname>
- </para>
- </listitem>
- </itemizedlist>
<para>
The <sgmltag><a4j:region></sgmltag> component specifies a
part of the document object model (<acronym>DOM</acronym>) tree to be
processed on the server. The processing includes data handling during decoding,
conversion, validation, and model updating. When not using
<sgmltag><a4j:region></sgmltag>, the entire view functions as a
region.
</para>
<para>
The whole form is still submitted to the server, but only the specified region is
processed. Regions can be nested, in which case only the immediate region of the component
initiating the request will be processed.
</para>
+
+ <section id="sect-Component_Reference-a4jregion-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.ajax4jsf.AjaxRegion</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.HtmlAjaxRegion</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>org.ajax4jsf.AjaxRegion</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.components.AjaxRegionRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
</chapter>
Modified:
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Processing_management.xml
===================================================================
---
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Processing_management.xml 2010-08-23
03:50:06 UTC (rev 18921)
+++
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Processing_management.xml 2010-08-23
07:04:53 UTC (rev 18922)
@@ -8,227 +8,249 @@
</para>
<section id="sect-Component_Reference-Processing_management-a4jqueue">
<title><sgmltag><a4j:queue></sgmltag></title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.QueueRenderer</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.HtmlQueue</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>:
<classname>org.ajax4jsf.Queue</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>tag-class</parameter>:
<classname>org.ajax4jsf.taglib.html.jsp.QueueTag</classname>
- </para>
- </listitem>
- </itemizedlist>
<para>
The <sgmltag><a4j:queue></sgmltag> component manages a queue
of Ajax requests to control message processing.
</para>
- <para>
- The queue can be disabled by setting the <varname>disabled</varname>
attribute to <literal>true</literal>. The <varname>size</varname>
attribute specifies the number of requests that can be stored in the queue at a time;
smaller queue sizes help prevent server overloads. When the queue's size is exceeded,
the <varname>sizeExceededBehavior</varname> determines the way in which the
queue handles the requests:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>dropNext</literal> drops the next request currently in the
queue.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>dropNew</literal> drops the incoming request.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>fireNext</literal> immediately sends the next request currently
in the queue.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>fireNew</literal> immediately sends the incoming request.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- The <sgmltag><a4j:queue></sgmltag> component features
several events relating to queuing actions:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The <varname>oncomplete</varname> event attribute is fired after a
request is completed. The request object is passed as a parameter to the event handler, so
the queue is accessible using <code>request.queue</code> and the element which
was the source of the request is accessible using <code>this</code>.
- </para>
- </listitem>
- <listitem>
- <para>
- The <varname>onrequestqueue</varname> event attribute is fired after a
new request has been added to the queue.
- </para>
- </listitem>
- <listitem>
- <para>
- The <varname>onrequestdequeue</varname> event attribute is fired after a
request has been removed from the queue.
- </para>
- </listitem>
- <listitem>
- <para>
- The <varname>onsizeexceeded</varname> event attribute is fired when the
queue has been exceeded.
- </para>
- </listitem>
- <listitem>
- <para>
- The <varname>onsubmit</varname> event attribute is fired before the
request is sent.
- </para>
- </listitem>
- <listitem>
- <para>
- The <varname>onsuccess</varname> event attribute is fired after a
successful request bu before the <acronym>DOM</acronym> is updated on the
client side.
- </para>
- </listitem>
- </itemizedlist>
+
+ <section id="sect-Component_Reference-a4jqueue-Queue_size">
+ <title>Queue size</title>
+ <para>
+ The <varname>size</varname> attribute specifies the number of requests
that can be stored in the queue at a time; smaller queue sizes help prevent server
overloads. When the queue's size is exceeded, the
<varname>sizeExceededBehavior</varname> determines the way in which the queue
handles the requests:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>dropNext</literal> drops the next request currently in the
queue.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>dropNew</literal> drops the incoming request.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>fireNext</literal> immediately sends the next request
currently in the queue.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>fireNew</literal> immediately sends the incoming request.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section
id="sect-Component_Reference-a4jqueue-a4jqueue_client-side_events">
+ <title><sgmltag><a4j:queue></sgmltag> client-side
events</title>
+ <para>
+ The <sgmltag><a4j:queue></sgmltag> component features
several events relating to queuing actions:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The <varname>oncomplete</varname> event attribute is fired after a
request is completed. The request object is passed as a parameter to the event handler, so
the queue is accessible using <code>request.queue</code> and the element which
was the source of the request is accessible using <code>this</code>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <varname>onrequestqueue</varname> event attribute is fired after a
new request has been added to the queue.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <varname>onrequestdequeue</varname> event attribute is fired after
a request has been removed from the queue.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <varname>onsizeexceeded</varname> event attribute is fired when the
queue has been exceeded.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <varname>onsubmit</varname> event attribute is fired before the
request is sent.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <varname>onsuccess</varname> event attribute is fired after a
successful request but before the <acronym>DOM</acronym> is updated on the
client side.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="sect-Component_Reference-a4jqueue-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.QueueRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.HtmlQueue</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>org.ajax4jsf.Queue</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>:
<classname>org.ajax4jsf.taglib.html.jsp.QueueTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
<section id="sect-Component_Reference-Processing_management-a4jlog">
<title><sgmltag><a4j:log></sgmltag></title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>:
<classname>org.ajax4jsf.Log</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.AjaxLog</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>:
<classname>org.ajax4jsf.Log</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.LogRenderer</classname>
- </para>
- </listitem>
- </itemizedlist>
<para>
The <sgmltag><a4j:log></sgmltag> component generates
JavaScript that opens a debug window, logging application information such as requests,
responses, and <acronym>DOM</acronym> changes.
</para>
- <para>
- The <varname>popup</varname> attribute causes the logging data to appear
in a new pop-up window if set to <literal>true</literal>, or in place on the
current page if set to <literal>false</literal>. The window is set to be
opened by pressing the key combination <keycombo
action="simul"><keycap>Ctrl</keycap><keycap>Shift</keycap><keycap>L</keycap></keycombo>;
this can be partially reconfigured with the <varname>hotkey</varname>
attribute, which specifies the letter key to use in combination with
<keycombo><keycap>Ctrl</keycap><keycap>Shift</keycap></keycombo>
instead of <keycap>L</keycap>.
- </para>
- <para>
- The amount of data logged can be determined with the
<varname>level</varname> attribute:
- </para>
- <itemizedlist>
- <listitem>
+
+ <section id="sect-Component_Reference-a4jlog-Log_monitoring">
+ <title>Log monitoring</title><para>
+ The <varname>popup</varname> attribute causes the logging data to appear
in a new pop-up window if set to <literal>true</literal>, or in place on the
current page if set to <literal>false</literal>. The window is set to be
opened by pressing the key combination <keycombo
action="simul"><keycap>Ctrl</keycap><keycap>Shift</keycap><keycap>L</keycap></keycombo>;
this can be partially reconfigured with the <varname>hotkey</varname>
attribute, which specifies the letter key to use in combination with
<keycombo><keycap>Ctrl</keycap><keycap>Shift</keycap></keycombo>
instead of <keycap>L</keycap>.
+ </para>
+ <para>
+ The amount of data logged can be determined with the
<varname>level</varname> attribute:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>ERROR</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>FATAL</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>INFO</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>WARN</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>ALL</literal>, the default setting, logs all data.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <example id="exam-Component_Reference-a4jlog-a4jlog_example">
+ <title><sgmltag><a4j:log></sgmltag>
example</title>
+ <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-a4jlog-a4jlog_example.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ </example>
+ <note>
+ <title>Log renewal</title>
<para>
- <literal>ERROR</literal>
+ The log is automatically renewed after each Ajax request. It does not need to be
explicitly re-rendered.
</para>
- </listitem>
- <listitem>
- <para>
- <literal>FATAL</literal>
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>INFO</literal>
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>WARN</literal>
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>ALL</literal>, the default setting, logs all data.
- </para>
- </listitem>
- </itemizedlist>
- <example id="exam-Component_Reference-a4jlog-a4jlog_example">
- <title><sgmltag><a4j:log></sgmltag>
example</title>
-
-<programlisting language="XML" role="XML">
-<a4j:log level="ALL" popup="false" width="400"
height="200" />
-</programlisting>
- </example>
- <note>
- <title>Log renewal</title>
- <para>
- The log is automatically renewed after each Ajax request. It does not need to be
explicitly re-rendered.
- </para>
- </note>
+ </note>
+ </section>
+
+ <section id="sect-Component_Reference-a4jlog-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.ajax4jsf.Log</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.AjaxLog</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>org.ajax4jsf.Log</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.LogRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
<section id="sect-Component_Reference-Processing_management-a4jstatus">
<title><sgmltag><a4j:status></sgmltag></title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>:
<classname>org.ajax4jsf.Status</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.HtmlAjaxStatus</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>:
<classname>javax.faces.Panel</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.components.AjaxStatusRenderer</classname>
- </para>
- </listitem>
- </itemizedlist>
<para>
The <sgmltag><a4j:status></sgmltag> component displays the
status of current Ajax requests; the status can be either in progress or complete.
</para>
- <para>
- The <varname>startText</varname> attribute defines the text shown after
the request has been started and is currently in progress. This text can be styled with
the <varname>startStyle</varname> and
<varname>startStyleClass</varname> attributes. Similarly, the
<varname>stopText</varname> attribute defines the text shown once the request
is complete, and text is styled with the <varname>stopStyle</varname> and
<varname>stopStyleClass</varname> attributes. Alternatively, the text styles
can be customized using facets, with the facet name set to either
<literal>start</literal> or <literal>stop</literal> as required.
If the <varname>stopText</varname> attribute is not defined, and no facet
exists for the stopped state, the status is simply not shown; in this way only the
progress of the request is displayed to the user.
- </para>
- <example
id="exam-Component_Reference-a4jstatus-Basic_a4jstatus_usage">
- <title>Basic <sgmltag><a4j:status></sgmltag>
usage</title>
-
-<programlisting language="XML" role="XML">
-<a4j:status startText="In progress..." stopText="Complete"
/>
-</programlisting>
- </example>
- <para>
- The <sgmltag><a4j:status></sgmltag> component works for each
Ajax component inside the local region. If no region is defined, every request made on the
page will activate the <sgmltag><a4j:status></sgmltag>
component. Alternatively, the <sgmltag><a4j:status></sgmltag>
component can be linked to specific components in one of two ways:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The <varname>for</varname> attribute can be used to specify the
component for which the status is to be monitored.
- </para>
- </listitem>
- <listitem>
- <para>
- With an <varname>id</varname> identifier attribute specified for the
<sgmltag><a4j:status></sgmltag>, individual components can have
their statuses monitored by referencing the identifier with their own
<varname>status</varname> attributes.
- </para>
- </listitem>
- </itemizedlist>
- <example
id="exam-Component_Reference-a4jstatus-Updating_a_common_a4jstatus_component">
- <title>Updating a common
<sgmltag><a4j:status></sgmltag> component</title>
-
-<programlisting language="XML" role="XML">
-<xi:include
href="extras/exam-Component_Reference-a4jstatus-Updating_a_common_a4jstatus_component.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
- </example>
+
+ <section id="sect-Component_Reference-a4jstatus-Customizing_the_text">
+ <title>Customizing the text</title>
+ <para>
+ The <varname>startText</varname> attribute defines the text shown after
the request has been started and is currently in progress. This text can be styled with
the <varname>startStyle</varname> and
<varname>startStyleClass</varname> attributes. Similarly, the
<varname>stopText</varname> attribute defines the text shown once the request
is complete, and text is styled with the <varname>stopStyle</varname> and
<varname>stopStyleClass</varname> attributes. Alternatively, the text styles
can be customized using facets, with the facet name set to either
<literal>start</literal> or <literal>stop</literal> as required.
If the <varname>stopText</varname> attribute is not defined, and no facet
exists for the stopped state, the status is simply not shown; in this way only the
progress of the request is displayed to the user.
+ </para>
+ <example
id="exam-Component_Reference-a4jstatus-Basic_a4jstatus_usage">
+ <title>Basic <sgmltag><a4j:status></sgmltag>
usage</title>
+ <programlisting language="XML" role="XML"><xi:include
href="extras/exam-Component_Reference-a4jstatus-Basic_a4jstatus_usage.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude"
/></programlisting>
+ </example>
+ </section>
+
+ <section id="sect-Component_Reference-a4jstatus-Specifying_a_region">
+ <title>Specifying a region</title>
+ <para>
+ The <sgmltag><a4j:status></sgmltag> component works for
each Ajax component inside the local region. If no region is defined, every request made
on the page will activate the <sgmltag><a4j:status></sgmltag>
component. Alternatively, the <sgmltag><a4j:status></sgmltag>
component can be linked to specific components in one of two ways:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The <varname>for</varname> attribute can be used to specify the
component for which the status is to be monitored.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ With an <varname>id</varname> identifier attribute specified for the
<sgmltag><a4j:status></sgmltag>, individual components can have
their statuses monitored by referencing the identifier with their own
<varname>status</varname> attributes.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <example
id="exam-Component_Reference-a4jstatus-Updating_a_common_a4jstatus_component">
+ <title>Updating a common
<sgmltag><a4j:status></sgmltag> component</title>
+ <programlisting language="XML" role="XML"><xi:include
href="extras/exam-Component_Reference-a4jstatus-Updating_a_common_a4jstatus_component.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude"
/></programlisting>
+ </example>
+ </section>
+
+ <section id="sect-Component_Reference-a4jstatus-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.ajax4jsf.Status</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.HtmlAjaxStatus</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>javax.faces.Panel</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.ajax4jsf.components.AjaxStatusRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
</chapter>
Modified:
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Resources.xml
===================================================================
---
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Resources.xml 2010-08-23
03:50:06 UTC (rev 18921)
+++
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Resources.xml 2010-08-23
07:04:53 UTC (rev 18922)
@@ -194,39 +194,51 @@
<section id="sect-Component_Reference-Resources-a4jkeepAlive">
<title><sgmltag><a4j:keepAlive></sgmltag></title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>:
<classname>org.ajax4jsf.components.KeepAlive</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>:
<classname>org.ajax4jsf.components.AjaxKeepAlive</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>:
<classname>org.ajax4jsf.components.AjaxKeepAlive</classname>
- </para>
- </listitem>
- </itemizedlist>
<para>
The <sgmltag><a4j:keepAlive></sgmltag> component allows the
state of a managed bean to be retained between Ajax requests.
</para>
<para>
- Managed beans can be declared with the <literal>request</literal> scope in
the <filename>faces-config.xml</filename> configuration file, using the
<sgmltag><managed-bean-scope></sgmltag> tag. Any references to
the bean instance after the request has ended will cause the server to throw an illegal
argument exception (<exceptionname>IllegalArgumentException</exceptionname>).
The <sgmltag><a4j:keepAlive></sgmltag> component avoids this be
maintaining the state of the whole bean object for subsequent requests.
+ Managed beans can be declared with the <literal>request</literal> scope in
the <filename>faces-config.xml</filename> configuration file, using the
<sgmltag><managed-bean-scope></sgmltag> tag. Any references to
the bean instance after the request has ended will cause the server to throw an illegal
argument exception (<exceptionname>IllegalArgumentException</exceptionname>).
The <sgmltag><a4j:keepAlive></sgmltag> component avoids this by
maintaining the state of the whole bean object for subsequent requests.
</para>
- <para>
- The <varname>beanName</varname> attribute defines the request-scope
managed bean name to keep alive. The <varname>ajaxOnly</varname> attribute
determines whether or not the value of the bean should be available during non-Ajaxx
requests; if <code>ajaxOnly="true"</code>, the request-scope bean
keeps its value during Ajax requests, but any non-Ajax requests will re-create the bean as
a regular request-scope bean.
- </para>
- <example
id="exam-Component_Reference-a4jkeepAlive-a4jkeepAlive_example">
- <title><sgmltag><a4j:keepAlive></sgmltag>
example</title>
-
-<programlisting language="XML" role="XML">
-<a4j:keepAlive beanName="testBean" />
-</programlisting>
- </example>
+
+ <section id="sect-Component_Reference-a4jkeepAlive-Basic_usage">
+ <title>Basic usage</title>
+ <para>
+ The <varname>beanName</varname> attribute defines the request-scope
managed bean name to keep alive.
+ </para>
+ <example
id="exam-Component_Reference-a4jkeepAlive-a4jkeepAlive_example">
+ <title><sgmltag><a4j:keepAlive></sgmltag>
example</title>
+ <programlisting language="XML" role="XML"><xi:include
href="extras/exam-Component_Reference-a4jkeepAlive-a4jkeepAlive_example.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude"
/></programlisting>
+ </example>
+ </section>
+
+ <section id="sect-Component_Reference-a4jkeepAlive-Non-Ajax_requests">
+ <title>Non-Ajax requests</title>
+ <para>
+ The <varname>ajaxOnly</varname> attribute determines whether or not the
value of the bean should be available during non-Ajax requests; if
<code>ajaxOnly="true"</code>, the request-scope bean keeps its value
during Ajax requests, but any non-Ajax requests will re-create the bean as a regular
request-scope bean.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-a4jkeepAlive-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.ajax4jsf.components.KeepAlive</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.ajax4jsf.components.AjaxKeepAlive</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>org.ajax4jsf.components.AjaxKeepAlive</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
<!-- TODO not in M2 -->
Modified:
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Selection_and_ordering.xml
===================================================================
---
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Selection_and_ordering.xml 2010-08-23
03:50:06 UTC (rev 18921)
+++
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Selection_and_ordering.xml 2010-08-23
07:04:53 UTC (rev 18922)
@@ -11,8 +11,6 @@
<para>
The <sgmltag><rich:listShuttle></sgmltag> component is used
for moving select items from one list into another. Items can optionally be re-ordered. It
supports selection of multiple items, keyboard usage, and a customizable look and feel.
</para>
- <para>
- </para>
</section>
<section
id="sect-Component_Reference-Selection_and_ordering-richorderingList">
Modified:
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Validation.xml
===================================================================
---
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Validation.xml 2010-08-23
03:50:06 UTC (rev 18921)
+++
modules/docs/branches/draft/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Validation.xml 2010-08-23
07:04:53 UTC (rev 18922)
@@ -6,35 +6,9 @@
<para>
This chapter covers those components that validate user input. The components enhance
<acronym>JSF</acronym> validation capabilities with Ajax support and the use
of <application>Hibernate</application> validators.
</para>
+
<section id="sect-Component_Reference-Validation-richajaxValidator">
<title><sgmltag><rich:ajaxValidator></sgmltag></title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>:
<classname>org.richfaces.ajaxValidator</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlajaxValidator</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>:
<classname>org.richfaces.ajaxValidator</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>:
<classname>org.richfaces.ajaxValidatorRenderer</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>tag-class</parameter>:
<classname>org.richfaces.taglib.ajaxValidatorTag</classname>
- </para>
- </listitem>
- </itemizedlist>
<para>
The <sgmltag><rich:ajaxValidator></sgmltag> component
provides Ajax validation for <acronym>JSF</acronym> inputs. It is added as a
child component to a <acronym>JSF</acronym> tag, and the
<varname>event</varname> attribute specifies when to trigger the validation.
</para>
@@ -43,209 +17,242 @@
<para>
This example shows the use of
<sgmltag><rich:ajaxValidator></sgmltag> with standard
<acronym>JSF</acronym> validators. The validators check the length of the
entered name, and the range of the entered age.
</para>
-
-<programlisting language="XML" role="XML">
-<xi:include
href="extras/exam-Component_Reference-richajaxValidator-richajaxValidator_example.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
+ <programlisting language="XML" role="XML"><xi:include
href="extras/exam-Component_Reference-richajaxValidator-richajaxValidator_example.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude"
/></programlisting>
</example>
- <para>
- The <sgmltag><rich:ajaxValidator></sgmltag> component can
also work with custom validators made using the <acronym>JSF</acronym>
Validation <acronym>API</acronym> in the
<package>javax.faces.validator</package> package, or with Hibernate Validator.
Refer to the <citetitle>Hibernate Validator documentation</citetitle> for
details on how to use Hibernate Validator.
- </para>
- <example
id="exam-Component_Reference-richajaxValidator-Using_richajaxValidator_with_Hibernate_Validator">
- <title>Using <sgmltag><rich:ajaxValidator></sgmltag>
with Hibernate Validator</title>
+
+ <section
id="sect-Component_Reference-richajaxValidator-Custom_validators">
+ <title>Custom validators</title>
<para>
- This example shows the use of
<sgmltag><rich:ajaxValidator></sgmltag> with Hibernate
Validator. It validates the entered name, email, and age.
+ The <sgmltag><rich:ajaxValidator></sgmltag> component can
also work with custom validators made using the <acronym>JSF</acronym>
Validation <acronym>API</acronym> in the
<package>javax.faces.validator</package> package, or with Hibernate Validator.
Refer to the <citetitle>Hibernate Validator documentation</citetitle> for
details on how to use Hibernate Validator.
</para>
-
-<programlisting language="XML" role="XML">
-<xi:include
href="extras/exam-Component_Reference-richajaxValidator-Using_richajaxValidator_with_Hibernate_Validator-0.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
- <para>
- The validation is performed using the
<classname>ValidationBean</classname> class:
- </para>
-
-<programlisting language="Java" role="JAVA">
-<xi:include href="extras/exam-Component_Reference-ValidationBean.js"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
- <blockquote>
- <figure
id="figu-Component_Reference-Using_richajaxValidator_with_Hibernate_Validator-richajaxValidator_example_result">
- <title><sgmltag><rich:ajaxValidator></sgmltag>
example result</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/figu-Component_Reference-richajaxValidator-richajaxValidator_example_result.png"
format="PNG" width="444" />
- </imageobject>
- <textobject>
- <para>
- The result of the
<sgmltag><rich:ajaxValidator></sgmltag> example: three text
entry fields with corresponding validation messages.
- </para>
- </textobject>
- </mediaobject>
- </figure>
- </blockquote>
- </example>
+ <example
id="exam-Component_Reference-richajaxValidator-Using_richajaxValidator_with_Hibernate_Validator">
+ <title>Using <sgmltag><rich:ajaxValidator></sgmltag>
with Hibernate Validator</title>
+ <para>
+ This example shows the use of
<sgmltag><rich:ajaxValidator></sgmltag> with Hibernate
Validator. It validates the entered name, email, and age.
+ </para>
+ <programlisting language="XML" role="XML"><xi:include
href="extras/exam-Component_Reference-richajaxValidator-Using_richajaxValidator_with_Hibernate_Validator-0.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude"
/></programlisting>
+ <para>
+ The validation is performed using the
<classname>ValidationBean</classname> class:
+ </para>
+ <programlisting language="Java" role="JAVA"><xi:include
href="extras/exam-Component_Reference-ValidationBean.js" parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ <blockquote>
+ <figure
id="figu-Component_Reference-Using_richajaxValidator_with_Hibernate_Validator-richajaxValidator_example_result">
+ <title><sgmltag><rich:ajaxValidator></sgmltag>
example result</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/figu-Component_Reference-richajaxValidator-richajaxValidator_example_result.png"
format="PNG" width="444" />
+ </imageobject>
+ <textobject>
+ <para>
+ The result of the
<sgmltag><rich:ajaxValidator></sgmltag> example: three text
entry fields with corresponding validation messages.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
+ </blockquote>
+ </example>
+ </section>
+
+ <section
id="sect-Component_Reference-richajaxValidator-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.richfaces.ajaxValidator</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlajaxValidator</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>org.richfaces.ajaxValidator</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.richfaces.ajaxValidatorRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>:
<classname>org.richfaces.taglib.ajaxValidatorTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
<section id="sect-Component_Reference-Validation-richbeanValidator">
<title><sgmltag><rich:beanValidator></sgmltag></title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>:
<classname>org.richfaces.beanValidator</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlbeanValidator</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>:
<classname>org.richfaces.beanValidator</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>:
<classname>org.richfaces.beanValidatorRenderer</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>tag-class</parameter>:
<classname>org.richfaces.taglib.beanValidatorTag</classname>
- </para>
- </listitem>
- </itemizedlist>
<para>
The <sgmltag><rich:beanValidator></sgmltag> component
provides model-based constraints using Hibernate Validator. This allows Hibernate
Validator to be used similar to its use with Seam-based applications.
</para>
- <para>
- The <varname>summary</varname> attribute is used for displaying messages
about validation errors.
- </para>
- <example
id="exam-Component_Reference-richbeanValidator-richbeanValidator_example">
- <title><sgmltag><rich:beanValidator></sgmltag>
example</title>
+ <section id="sect-Component_Reference-richbeanValidator-Basic_usage">
+ <title>Basic usage</title>
<para>
- This example shows the bean-based validation of a simple form, containing the
user's name, email, and age. The
<sgmltag><rich:beanValidator></sgmltag> component is defined in
the same way as for <acronym>JSF</acronym> validators.
+ The <varname>summary</varname> attribute is used for displaying messages
about validation errors.
</para>
-
-<programlisting language="XML" role="XML">
-<xi:include
href="extras/exam-Component_Reference-richbeanValidator-richbeanValidator_example-0.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
- <para>
- The accompanying bean contains the validation data:
- </para>
-
-<programlisting language="Java" role="JAVA">
-<xi:include href="extras/exam-Component_Reference-ValidationBean.js"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
- <blockquote>
- <figure
id="figu-Component_Reference-richbeanValidator_example-richbeanValidator_example_result">
- <title><sgmltag><rich:beanValidator></sgmltag>
example result</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/figu-Component_Reference-richbeanValidator-richbeanValidator_example_result.png"
format="PNG" width="444" />
- </imageobject>
- <textobject>
- <para>
- The result of the
<sgmltag><rich:beanValidator></sgmltag> example: three text
entry fields with corresponding validation messages.
- </para>
- </textobject>
- </mediaobject>
- </figure>
- </blockquote>
- </example>
+ <example
id="exam-Component_Reference-richbeanValidator-richbeanValidator_example">
+ <title><sgmltag><rich:beanValidator></sgmltag>
example</title>
+ <para>
+ This example shows the bean-based validation of a simple form, containing the
user's name, email, and age. The
<sgmltag><rich:beanValidator></sgmltag> component is defined in
the same way as for <acronym>JSF</acronym> validators.
+ </para>
+ <programlisting language="XML" role="XML"><xi:include
href="extras/exam-Component_Reference-richbeanValidator-richbeanValidator_example-0.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude"
/></programlisting>
+ <para>
+ The accompanying bean contains the validation data:
+ </para>
+ <programlisting language="Java" role="JAVA"><xi:include
href="extras/exam-Component_Reference-ValidationBean.js" parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ <blockquote>
+ <figure
id="figu-Component_Reference-richbeanValidator_example-richbeanValidator_example_result">
+ <title><sgmltag><rich:beanValidator></sgmltag>
example result</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/figu-Component_Reference-richbeanValidator-richbeanValidator_example_result.png"
format="PNG" width="444" />
+ </imageobject>
+ <textobject>
+ <para>
+ The result of the
<sgmltag><rich:beanValidator></sgmltag> example: three text
entry fields with corresponding validation messages.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
+ </blockquote>
+ </example>
+ </section>
+
+ <section
id="sect-Component_Reference-richbeanValidator-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.richfaces.beanValidator</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlbeanValidator</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>org.richfaces.beanValidator</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.richfaces.beanValidatorRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>:
<classname>org.richfaces.taglib.beanValidatorTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
<section id="sect-Component_Reference-Validation-richgraphValidator">
<title><sgmltag><rich:graphValidator></sgmltag></title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>:
<classname>org.richfaces.graphValidator</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlgraphValidator</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>:
<classname>org.richfaces.graphValidator</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>:
<classname>org.richfaces.graphValidatorRenderer</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>tag-class</parameter>:
<classname>org.richfaces.taglib.graphValidatorTag</classname>
- </para>
- </listitem>
- </itemizedlist>
<para>
The <sgmltag><rich:graphValidator></sgmltag> component is
used to wrap a group of input components for overall validation with Hibernate Validators.
This is different from the
<sgmltag><rich:beanValidator></sgmltag> component, which is used
as a child element to individual input components.
</para>
- <para>
- The <varname>summary</varname> attribute is used for displaying messages
about validation errors.
- </para>
- <example
id="exam-Component_Reference-richgraphValidator-richgraphValidator_example">
- <title><sgmltag><rich:graphValidator></sgmltag>
example</title>
+
+ <section id="sect-Component_Reference-richgraphValidator-Basic_usage">
+ <title>Basic usage</title>
<para>
- This example shows the validation of a simple form, containing the user's name,
email, and age. The <sgmltag><rich:graphValidator></sgmltag>
component wraps the input components to validate them together.
+ The <varname>summary</varname> attribute is used for displaying messages
about validation errors.
</para>
-
-<programlisting language="XML" role="XML">
-<xi:include
href="extras/exam-Component_Reference-richgraphValidator-richgraphValidator_example-0.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
+ <example
id="exam-Component_Reference-richgraphValidator-richgraphValidator_example">
+ <title><sgmltag><rich:graphValidator></sgmltag>
example</title>
+ <para>
+ This example shows the validation of a simple form, containing the user's name,
email, and age. The <sgmltag><rich:graphValidator></sgmltag>
component wraps the input components to validate them together.
+ </para>
+ <programlisting language="XML" role="XML"><xi:include
href="extras/exam-Component_Reference-richgraphValidator-richgraphValidator_example-0.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude"
/></programlisting>
+ <para>
+ The accompanying bean contains the validation data:
+ </para>
+ <programlisting language="Java" role="JAVA"><xi:include
href="extras/exam-Component_Reference-ValidationBean.js" parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ <blockquote>
+ <figure
id="figu-Component_Reference-richgraphValidator_example-richgraphValidator_example_result">
+ <title><sgmltag><rich:graphValidator></sgmltag>
example result</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/figu-Component_Reference-richgraphValidator-richgraphValidator_example_result.png"
format="PNG" width="444" />
+ </imageobject>
+ <textobject>
+ <para>
+ The result of the
<sgmltag><rich:graphValidator></sgmltag> example: three text
entry fields with corresponding validation messages.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
+ </blockquote>
+ </example>
+ </section>
+
+ <section id="sect-Component_Reference-richgraphValidator-Bean_values">
+ <title>Bean values</title>
<para>
- The accompanying bean contains the validation data:
+ The optional <varname>value</varname> attribute can be used to define a
value bound to the bean. The bean properties are then validated again
<emphasis>after</emphasis> the model has been updated.
</para>
+ <example
id="exam-Component_Reference-richgraphValidator-Using_the_value_attribute">
+ <title>Using the <varname>value</varname> attribute</title>
-<programlisting language="Java" role="JAVA">
-<xi:include href="extras/exam-Component_Reference-ValidationBean.js"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
- <blockquote>
- <figure
id="figu-Component_Reference-richgraphValidator_example-richgraphValidator_example_result">
- <title><sgmltag><rich:graphValidator></sgmltag>
example result</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/figu-Component_Reference-richgraphValidator-richgraphValidator_example_result.png"
format="PNG" width="444" />
- </imageobject>
- <textobject>
- <para>
- The result of the
<sgmltag><rich:graphValidator></sgmltag> example: three text
entry fields with corresponding validation messages.
- </para>
- </textobject>
- </mediaobject>
- </figure>
- </blockquote>
- </example>
- <para>
- The optional <varname>value</varname> attribute can be used to define a
value bound to the bean. The bean properties are then validated again
<emphasis>after</emphasis> the model has been updated.
- </para>
- <example
id="exam-Component_Reference-richgraphValidator-Using_the_value_attribute">
- <title>Using the <varname>value</varname> attribute</title>
-
-<programlisting language="XML" role="XML">
-<xi:include
href="extras/exam-Component_Reference-richgraphValidator-Using_the_value_attribute.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-</programlisting>
- <blockquote>
- <figure
id="figu-Component_Reference-Using_the_value_attribute-Result_from_using_the_value_attribute">
- <title>Result from using the <varname>value</varname>
attribute</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/figu-Component_Reference-richgraphValidator-Result_from_using_the_value_attribute.png"
format="PNG" width="444" />
- </imageobject>
- <textobject>
- <para>
- The result from the example of using the <varname>value</varname>
attribute with <sgmltag><rich:graphValidator></sgmltag>. The
values in the number spinners need to validate before being stored.
- </para>
- </textobject>
- </mediaobject>
- </figure>
- </blockquote>
- </example>
+ <programlisting language="XML" role="XML">
+ <xi:include
href="extras/exam-Component_Reference-richgraphValidator-Using_the_value_attribute.xml_sample"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ </programlisting>
+ <blockquote>
+ <figure
id="figu-Component_Reference-Using_the_value_attribute-Result_from_using_the_value_attribute">
+ <title>Result from using the <varname>value</varname>
attribute</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/figu-Component_Reference-richgraphValidator-Result_from_using_the_value_attribute.png"
format="PNG" width="444" />
+ </imageobject>
+ <textobject>
+ <para>
+ The result from the example of using the <varname>value</varname>
attribute with <sgmltag><rich:graphValidator></sgmltag>. The
values in the number spinners need to validate before being stored.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
+ </blockquote>
+ </example>
+ </section>
+
+ <section
id="sect-Component_Reference-richgraphValidator-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.richfaces.graphValidator</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlgraphValidator</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>org.richfaces.graphValidator</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.richfaces.graphValidatorRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>:
<classname>org.richfaces.taglib.graphValidatorTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
</chapter>