Author: SeanRogers
Date: 2011-03-24 02:34:34 -0400 (Thu, 24 Mar 2011)
New Revision: 22300
Added:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jparam-Passing_client-side_parameters.xml_sample
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jparam-a4jparam_example.java
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jparam-a4jparam_example.xml_sample
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jpush-Basic_usage.java
Removed:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jactionParam-a4jactionParam_example.js
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jactionParam-a4jactionParam_example.xml_sample
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/Component_Reference.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Actions.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Containers.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Functions.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Validation.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jjsFunction-a4jjsFunction_example.xml_sample
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richcomponentControl-Using_parameters-1.xml_sample
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richcomponentControl-richcomponentControl_basic_usage.xml_sample
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richgraphValidator-Basic_usage.js
Log:
Revised according to part 1 of engineering review: RFPL-1380
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/Component_Reference.xml
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/Component_Reference.xml 2011-03-24
01:53:32 UTC (rev 22299)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/Component_Reference.xml 2011-03-24
06:34:34 UTC (rev 22300)
@@ -11,7 +11,9 @@
<part id="part-Component_Reference-Ajax_control_components">
<title>Ajax control components</title>
<xi:include href="chap-Component_Reference-Actions.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <!--
<xi:include href="chap-Component_Reference-Resources.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ -->
<xi:include href="chap-Component_Reference-Containers.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="chap-Component_Reference-Validation.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="chap-Component_Reference-Processing_management.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Actions.xml
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Actions.xml 2011-03-24
01:53:32 UTC (rev 22299)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Actions.xml 2011-03-24
06:34:34 UTC (rev 22300)
@@ -10,18 +10,30 @@
<section id="sect-Component_Reference-Actions-a4jajax">
<title><sgmltag><a4j:ajax></sgmltag></title>
<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" />.
+ The <sgmltag><a4j:ajax></sgmltag> behavior allows Ajax
capability to be added to a non-Ajax component. The non-Ajax component must implement the
<interfacename>ClientBehaviorHolder</interfacename> interface for all the
event attributes that support behavior rendering.
</para>
- <note>
- <title>Attaching JavaScript functions</title>
+
+ <section id="sect-Component_Reference-a4jajax-Basic_usage">
+ <title>Basic usage</title>
<para>
- When attaching the <sgmltag><a4j:ajax></sgmltag> component
to non-Ajax JavaServer Faces command components, such as
<sgmltag><h:commandButton></sgmltag> and
<sgmltag><h:commandLink></sgmltag>, it is important to set
<code>disabledDefault="true"</code>. If this attribute is not set, a
non-Ajax request is sent after the Ajax request and the page is refreshed unexpectedly.
+ The <sgmltag><a4j:ajax></sgmltag> behavior is placed as a
direct child to the component that requires Ajax support.
</para>
- </note>
- <example id="exam-Component_Reference-a4jajax-a4jajax_example">
- <title><sgmltag><a4j:ajax></sgmltag>
example</title>
- <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>
+ <para>
+ Point the <varname>event</varname> attribute to the standard JSF event
that triggers the behavior. If the <varname>event</varname> attribute is not
defined, the behavior is triggered on the event that normally provides interaction
behavior for the parent component.
+ </para>
+ <!--
+ <note>
+ <title>Attaching JavaScript functions</title>
+ <para>
+ When attaching the <sgmltag><a4j:ajax></sgmltag> behavior
to non-Ajax JavaServer Faces command components, such as the
<sgmltag><h:commandButton></sgmltag> and
<sgmltag><h:commandLink></sgmltag> components, it is important
to set <code>disabledDefault="true"</code>. If this attribute is not
set, a non-Ajax request is sent after the Ajax request and the page is refreshed
unexpectedly.
+ </para>
+ </note>
+ -->
+ <example id="exam-Component_Reference-a4jajax-a4jajax_example">
+ <title><sgmltag><a4j:ajax></sgmltag>
example</title>
+ <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>
<section id="sect-Component_Reference-a4jajax-Reference_data">
<title>Reference data</title>
@@ -50,51 +62,53 @@
</section>
</section>
- <section id="sect-Component_Reference-Actions-a4jactionParam">
- <title><sgmltag><a4j:actionParam></sgmltag></title>
+ <section id="sect-Component_Reference-Actions-a4jparam">
+ <title><sgmltag><a4j:param></sgmltag></title>
<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>.
+ The <sgmltag><a4j:param></sgmltag> behavior combines the
functionality of the JavaServer Faces (<acronym>JSF</acronym>) components
<sgmltag><f:param></sgmltag> and
<sgmltag><f:actionListener></sgmltag>.
</para>
- <section id="sect-Component_Reference-a4jactionParam-Basic_usage">
+ <section id="sect-Component_Reference-a4jparam-Basic_usage">
<title>Basic usage</title>
<para>
- Basic usage of the <sgmltag><a4j:actionParam></sgmltag>
requires three main attributes:
+ Basic usage of the <sgmltag><a4j:param></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
+ The <varname>value</varname> attribute is the initial value of the
parameter.
</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.
+ The <varname>assignTo</varname> attribute defines the bean property.
The property is 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.
+ <xref linkend="exam-Component_Reference-a4jparam-a4jparam_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>
+ <example id="exam-Component_Reference-a4jparam-a4jparam_example">
+ <title><sgmltag><a4j:param></sgmltag>
example</title>
+ <programlisting language="XML" role="XML"><xi:include
href="extras/exam-Component_Reference-a4jparam-a4jparam_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-a4jparam-a4jparam_example.java"
parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude"
/></programlisting>
<para>
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>
</section>
- <section
id="sect-Component_Reference-a4jactionParam-Interoperability">
+ <section id="sect-Component_Reference-a4jparam-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.
+ The <sgmltag><a4j:param></sgmltag> tag can be used with
non-Ajax components in addition to Ajax components. This includes components which are
working through the <code>GET</code> request, such as the
<sgmltag><h:link></sgmltag> and
<sgmltag><h:button></sgmltag> components. In this way, data
model values can also be updated without any Java 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.
@@ -105,22 +119,33 @@
If the validation of the form fails, the <emphasis>Update
Model</emphasis> phase will be skipped and the property will not be updated.
</para>
</note>
+ </section>
+
+ <section
id="sect-Component_Reference-a4jparam-Passing_client-side_parameters">
+ <title>Passing client-side parameters</title>
<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>
+ <example
id="exam-Component_Reference-a4jparam-Passing_client-side_parameters">
+ <title>Passing client-side parameters</title>
+ <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-a4jparam-Passing_client-side_parameters.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ <para>
+ The command button triggers the
<sgmltag><a4j:param></sgmltag> behaviors and renders the output
text. The <sgmltag><a4j:param></sgmltag> behaviors pass
client-side parameters for the screen width and height through the backing bean. These
parameters are then used to populate the output text values.
+ </para>
+ </example>
</section>
- <section id="sect-Component_Reference-a4jactionParam-Reference_data">
+ <section id="sect-Component_Reference-a4jparam-Reference_data">
<title>Reference data</title>
<itemizedlist>
<listitem>
<para>
- <parameter>component-type</parameter>:
<classname>org.ajax4jsf.ActionParameter</classname>
+ <parameter>component-type</parameter>:
<classname>org.ajax4jsf.parameter</classname>
</para>
</listitem>
<listitem>
<para>
- <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.HTMLActionParameter</classname>
+ <parameter>component-class</parameter>:
<classname>org.ajax4jsf.component.html.HTMLParameter</classname>
</para>
</listitem>
</itemizedlist>
@@ -164,7 +189,7 @@
<section id="sect-Component_Reference-Actions-a4jcommandButton">
<title><sgmltag><a4j:commandButton></sgmltag></title>
<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.
+ The <sgmltag><a4j:commandButton></sgmltag> component is
similar to the JavaServer Faces (<acronym>JSF</acronym>)
<sgmltag><h:commandButton></sgmltag> component, but additionally
includes Ajax support.
</para>
<figure
id="figu-Component_Reference-a4jcommandButton-a4jcommandButton">
<title><sgmltag><a4j:commandButton></sgmltag></title>
@@ -179,18 +204,29 @@
</textobject>
</mediaobject>
</figure>
+ <note>
+ <title>The <sgmltag><a4j:commandButton></sgmltag>
component executes the complete form</title>
+ <para>
+ Button controls are typically used to perform complete form submissions for data
storing. As a consequence, the
<sgmltag><a4j:commandButton></sgmltag> component has the
<code>execute="@form"</code> setting by default. To limit rendering
to a different scope, redefine the <varname>execute</varname> attribute.
+ </para>
+ </note>
<section id="sect-Component_Reference-a4jcommandButton-Basic_usage">
<title>Basic usage</title>
<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>click</varname> event instead of the
<varname>submit</varname> event, but otherwise uses all common Ajax attributes
as listed in <xref linkend="chap-Component_Reference-Common_Ajax_attributes"
/>.
+ The <sgmltag><a4j:commandButton></sgmltag> requires only
the <varname>value</varname> attribute to function. Use the
<varname>value</varname> attribute to specify the text of the button.
</para>
+ <para>
+ By default, the <sgmltag><a4j:commandButton></sgmltag> uses
the <varname>click</varname> event instead of the
<varname>submit</varname> event.
+ </para>
+ <!--
<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">
@@ -224,7 +260,7 @@
<section id="sect-Component_Reference-Actions-a4jcommandLink">
<title><sgmltag><a4j:commandLink></sgmltag></title>
<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.
+ The <sgmltag><a4j:commandLink></sgmltag> component is
similar to the JavaServer Faces (<acronym>JSF</acronym>)
<sgmltag><h:commandLink></sgmltag> component, except that it
includes plugged-in Ajax behavior.
</para>
<figure id="figu-Component_Reference-a4jcommandLink-a4jcommandLink">
<title><sgmltag><a4j:commandLink></sgmltag></title>
@@ -239,12 +275,21 @@
</textobject>
</mediaobject>
</figure>
+ <note>
+ <title>The <sgmltag><a4j:commandLink></sgmltag>
component executes the complete form</title>
+ <para>
+ Link controls are typically used to perform complete form submissions for data
storing. As a consequence, the
<sgmltag><a4j:commandLink></sgmltag> component has the
<code>execute="@form"</code> setting by default. To limit rendering
to a different scope, redefine the <varname>execute</varname> attribute.
+ </para>
+ </note>
<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>click</varname> event instead of the
<varname>submit</varname> event, but otherwise uses all common Ajax attributes
as listed in <xref linkend="chap-Component_Reference-Common_Ajax_attributes"
/>.
+ The <sgmltag><a4j:commandLink></sgmltag> requires only the
<varname>value</varname> attribute to function. Use the
<varname>value</varname> attribute to specify the text of the link.
</para>
+ <para>
+ The <sgmltag><a4j:commandLink></sgmltag> uses the
<varname>click</varname> event instead of the
<varname>submit</varname> event.
+ </para>
</section>
<section id="sect-Component_Reference-a4jcommandLink-Reference_data">
@@ -274,133 +319,6 @@
</section>
</section>
- <section id="sect-Component_Reference-Actions-richcomponentControl">
- <title><sgmltag><rich:componentControl></sgmltag></title>
- <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>
- The example contains a single command button, which when clicked shows the modal
panel with the identifier <literal>ccModalPanelID</literal>.
- </para>
- </example>
- </section>
-
- <section
id="sect-Component_Reference-richcomponentControl-Attaching_to_a_component">
- <title>Attaching to a component</title>
- <para>
- The <varname>attachTo</varname> attribute can be used to attach the event
to a component other than the parent component. If no
<varname>attachTo</varname> attribute is supplied, the
<sgmltag><rich:componentControl></sgmltag> component's
parent is used, as in <xref
linkend="exam-Component_Reference-richcomponentControl-richcomponentControl_basic_usage"
/>.
- </para>
- <example
id="exam-Component_Reference-richcomponentControl-Attaching_richcomponentControl_to_a_component">
- <title>Attaching
<sgmltag><rich:componentControl></sgmltag> to a
component</title>
- <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-richcomponentControl-Attaching_richcomponentControl_to_a_component.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- <para>
- In the example, the <literal>click</literal> event of the component with
the identifier <literal>ccCalendarID</literal> will trigger the
<literal>Expand</literal> operation for the component with the identifier
<literal>doExpandCalendarID</literal>.
- </para>
- </example>
- </section>
-
- <section
id="sect-Component_Reference-richcomponentControl-Parameters_and_JavaScript">
- <title>Parameters and JavaScript</title>
- <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>
- <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>
- The <varname>name</varname> attribute can be used to define a normal
JavaScript function that triggers the specified operation on the target component.
- </para>
- </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><literal>immediate</literal></term>
- <listitem>
- <para>
- attached during execution of the script.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>available</literal></term>
- <listitem>
- <para>
- attached after the target component is initialized.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>load</literal></term>
- <listitem>
- <para>
- attached after the page is loaded.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
-
- <section
id="sect-Component_Reference-richcomponentControl-Reference_data">
- <title>Reference data</title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>:
<classname>org.richfaces.ComponentControl</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlComponentControl</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>:
<classname>org.richfaces.ComponentControl</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>:
<classname>org.richfaces.ComponentControlRenderer</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>tag-class</parameter>:
<classname>org.richfaces.taglib.ComponentControlTag</classname>
- </para>
- </listitem>
- </itemizedlist>
- </section>
- </section>
-
<!-- TODO not in M2 -->
<!--
<section id="sect-Component_Reference-Actions-a4jhashParam">
@@ -449,28 +367,31 @@
<section id="sect-Component_Reference-Actions-a4jjsFunction">
<title><sgmltag><a4j:jsFunction></sgmltag></title>
<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.
+ The <sgmltag><a4j:jsFunction></sgmltag> component performs
Ajax requests directly from JavaScript code and retrieves server-side data. The
server-side data is returned in JavaScript Object Notation
(<acronym>JSON</acronym>) format prior to the execution of any JavaScript code
defined using the <varname>oncomplete</varname> attribute.
</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.
+ The <sgmltag><a4j:jsFunction></sgmltag> component requires
the <varname>data</varname> attribute. Use the
<varname>data</varname> attribute to define where the retrieved server-side
data is stored.
</para>
+ <para>
+ <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>
+ <para>
+ The output text for the name is changed depending on which table cell the user
hovers over with the mouse. The
<sgmltag><a4j:jsFunction></sgmltag> component manages the
updating and display of the name.
+ </para>
</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.
+ The <sgmltag><a4j:jsFunction></sgmltag> component allows
the use of the <sgmltag><a4j:param></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>complete</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">
@@ -512,9 +433,6 @@
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>
@@ -584,42 +502,118 @@
</para>
-->
<para>
- The <sgmltag><a4j:push></sgmltag> component performs
real-time updates on the client side from events raised at the server side. The events are
pushed out to the client through the Java Message Service
(<acronym>JMS</acronym>). When the
<sgmltag><a4j:push></sgmltag> component is triggered by a server
event, it can in turn cause Ajax updates and changes.
+ The <sgmltag><a4j:push></sgmltag> component performs
real-time updates on the client side from events raised at the server side. The events are
pushed out to the client through the Java Message Service
(<acronym>JMS</acronym>). When the
<sgmltag><a4j:push></sgmltag> component is triggered by a server
event, it can in turn cause Ajax updates and changes.
</para>
+ <para>
+ The <sgmltag><a4j:push></sgmltag> component uses the Comet
model for pushing data to the client.
+ </para>
<section id="sect-Component_Reference-a4jpush-Basic_usage">
<title>Basic usage</title>
<para>
- RichFaces requires the use of the
<filename>jquery-atmosphere.js</filename> client plug-in for push
functionality. The plug-in is added automatically by the push component renderer, but
needs to additionally be added as a build dependency to your project.
+ RichFaces requires the use of the
<filename>jquery-atmosphere.js</filename> client plug-in for push
functionality. Add the server-side Atmosphere framework as a build dependency to your
project.
</para>
<para>
- The JMS instance on the back-end must be configured to work with your
<sgmltag><a4j:push></sgmltag> components. Create topics on the
JMS server for the push functionality to check for new messages. Refer to
<citetitle>JMS Documentation</citetitle> for details on configuring JMS.
+ The JMS instance on the back-end must be configured to work with your
<sgmltag><a4j:push></sgmltag> components. Refer to the
<citetitle>JBoss Application Server Administration Console Guide</citetitle>
for details on managing JBoss Application Server through the Administration Console.
</para>
+ <example
id="exam-Component_Reference-a4jpush-JMS_server_configuration">
+ <title>JMS server configuration</title>
+ <para>
+ This example describes the JMS server configuration required for a simple chat room.
The chat room requires topics on the JMS server for the push functionality to check for
new messages. Create a new JMS topic using the following settings:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <guilabel>Name:</guilabel> chat
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <guilabel>JNDI name:</guilabel> /topic/chat
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Use the default settings for other options.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Add a single role for the topic in the same form using the following settings:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <guilabel>Name:</guilabel> guest
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <guilabel>Send:</guilabel> true
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <guilabel>Consume:</guilabel> true
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <guilabel>Create subscriber:</guilabel> true
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <guilabel>Delete subscriber:</guilabel> true
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <guilabel>Create durable subscriber:</guilabel> true
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <guilabel>Delete durable subscriber:</guilabel> true
+ </para>
+ </listitem>
+ </itemizedlist>
+ </example>
<para>
- Use the <sgmltag><a4j:push></sgmltag> component's
<varname>address</varname> attribute to reference the topic on the JMS server
that contains the pushed messages.
+ Ensure the <guilabel>Create durable subscriber</guilabel> and
<guilabel>Delete durable subscriber</guilabel> options are set to
<guilabel>true</guilabel> for push functionality. Durable subscriptions
receive all events, including those events which were sent while the push component was
not connected.
</para>
<para>
- The <sgmltag><a4j:push></sgmltag> component should also
include the <varname>onerror</varname> event attribute to inform the user when
an error has occurred with the push notifications.
+ Refer to <citetitle>JMS Documentation</citetitle> for details on
configuring the JMS Server.
</para>
+ <para>
+ With the JMS server configured, use the
<sgmltag><a4j:push></sgmltag> component's
<varname>address</varname> attribute to reference the topic on the JMS server
that contains the pushed messages.
+ </para>
<example id="exam-Component_Reference-a4jpush-Basic_usage">
<title>Basic usage</title>
<programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-a4jpush-Basic_usage.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ <programlisting language="Java" role="JAVA"><xi:include
parse="text"
href="extras/exam-Component_Reference-a4jpush-Basic_usage.java"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
<para>
- The example demonstrates a simple use of the
<sgmltag><a4j:push></sgmltag> component to manage a list of
users in a chat room. The <sgmltag><a4j:push></sgmltag>
component refers to the <code>#{chatBean.listSubtopic}@chat</code> address,
which has been created on the JMS server. When a new message arrives, the
<sgmltag><a4j:ajax></sgmltag> behavior causes the user list to
update. If an error occurs, the user is alerted.
+ The example demonstrates a simple use of the
<sgmltag><a4j:push></sgmltag> component to manage a list of
users in a chat room. The <sgmltag><a4j:push></sgmltag>
component refers to the <code>#{chatBean.listSubtopic}@chat</code> address,
which has been created on the JMS server. It then uses the sub-topics to separate messages
across different topics.
</para>
+ <para>
+ When a new message arrives, the
<sgmltag><a4j:ajax></sgmltag> behavior causes the user list to
update. If an error occurs, the user is alerted.
+ </para>
</example>
</section>
<section
id="sect-Component_Reference-a4jpush-Handling_a_push_notification">
<title>Handling a push notification</title>
<para>
- A push notification sent to the
<sgmltag><a4j:push></sgmltag> behavior will cause it to trigger
any <sgmltag><a4j:ajax></sgmltag> components attached as
sub-elements. Alternatively, use the <varname>ondataavailable</varname> event
attribute to define a handler.
+ A push notification sent to the
<sgmltag><a4j:push></sgmltag> behavior will cause it to trigger
any event handlers defined using the <varname>ondataavailable</varname> event
attribute.
</para>
+ <para>
+ The <sgmltag><a4j:push></sgmltag> component should also
include the <varname>onerror</varname> event attribute to inform the user when
an error has occurred with the push notifications.
+ </para>
<example
id="exam-Component_Reference-a4jpush-Handling_a_push_notification">
<title>Handling a push notification</title>
<programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-a4jpush-Handling_a_push_notification.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
<para>
- The example uses the <varname>dataavailable</varname> event attribute
with JavaScript to update messages in a chat room.
+ The example uses the <varname>dataavailable</varname> event attribute
with JavaScript to update messages in a chat room. The
<parameter>event.rf.data</parameter> parameter contains JMS message data
serialized to JavaScript.
</para>
</example>
</section>
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Containers.xml
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Containers.xml 2011-03-24
01:53:32 UTC (rev 22299)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Containers.xml 2011-03-24
06:34:34 UTC (rev 22300)
@@ -56,7 +56,8 @@
</important>
</section>
-->
-
+
+ <!--
<section id="sect-Component_Reference-Containers-a4jinclude">
<title><sgmltag><a4j:include></sgmltag></title>
<para>
@@ -111,6 +112,7 @@
</itemizedlist>
</section>
</section>
+ -->
<section id="sect-Component_Reference-Containers-a4joutputPanel">
<title><sgmltag><a4j:outputPanel></sgmltag></title>
@@ -118,6 +120,13 @@
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>
+ <section
id="sect-Component_Reference-a4joutputPanel-Aiding_complex_Ajax_rendering">
+ <title>Aiding complex Ajax rendering</title>
+ <para>
+ Use the <sgmltag><a4j:outputPanel></sgmltag> component to
wrap behaviors when using complex Ajax rendering. Parent components may not render
correctly when attached behaviors trigger updates. Point the behaviors to the wrapping
<sgmltag><a4j:outputPanel></sgmltag> component instead of the
parent components. The <sgmltag><a4j:outputPanel></sgmltag>
component is properly encoded to ensure the wrapped components are correctly rendered.
+ </para>
+ </section>
+
<section
id="sect-Component_Reference-a4joutputPanel-Panel_appearance">
<title>Panel appearance</title>
<para>
@@ -134,11 +143,13 @@
<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.
@@ -233,10 +244,10 @@
<section id="sect-Component_Reference-Containers-a4jregion">
<title><sgmltag><a4j:region></sgmltag></title>
<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.
+ The <sgmltag><a4j:region></sgmltag> component specifies a
part of the JSF component tree to be processed on the server. The region causes all the
<classname>a4j</classname> and <classname>rich</classname> Ajax
controls to execute: decoding, validating, and updating the model. The region causes these
components to execute even if not explicitly declared. As such, processing areas can more
easily be marked using a declarative approach.
</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.
+ Regions can be nested, in which case only the parent region of the component
initiating the request will be processed.
</para>
<section id="sect-Component_Reference-a4jregion-Reference_data">
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Functions.xml
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Functions.xml 2011-03-24
01:53:32 UTC (rev 22299)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Functions.xml 2011-03-24
06:34:34 UTC (rev 22300)
@@ -6,6 +6,89 @@
<para>
Read this chapter for details on special functions for use with particular components.
Using JavaServer Faces Expression Language (<acronym>JSF</acronym>
<acronym>EL</acronym>), these functions can be accessed through the
<varname>data</varname> attribute of components. Refer to <xref
linkend="sect-Component_Reference-Events_and_JavaScript_interactions-data" />
for details on the <varname>data</varname> attribute.
</para>
+
+ <section id="sect-Component_Reference-Functions-richcomponentControl">
+ <title><sgmltag><rich:componentControl></sgmltag></title>
+ <para>
+ The <sgmltag><rich:componentControl></sgmltag> behavior
allows JavaScript API functions to be called on target components. The functions are
called after defined events are triggered on the component to with the
<sgmltag><rich:componentControl></sgmltag> behavior is attached.
Initialization variants and activation events can be customized, and parameters can be
passed to the target component.
+ </para>
+
+ <section
id="sect-Component_Reference-richcomponentControl-Basic_usage">
+ <title>Basic usage</title>
+ <para>
+ The <varname>operation</varname> attribute is required to attach
JavaScript functions to the parent component, along with either the
<varname>target</varname> or <varname>selector</varname>
attributes. Use the <varname>operation</varname> attribute to specify the
JavaScript API function to perform. Use the <varname>target</varname>
attribute to define the <varname>id</varname> identifier of the target
component, or use the <varname>selector</varname> attribute to define a number
of target components through the use of valid jQuery selectors.
+ </para>
+ <para>
+ Use the <varname>event</varname> attribute to specify the event that
triggers the JavaScript API function call if it is different from the default triggering
event for the parent component.
+ </para>
+ <example
id="exam-Component_Reference-richcomponentControl-richcomponentControl_basic_usage">
+ <title><sgmltag><rich:componentControl></sgmltag>
basic usage</title>
+ <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-richcomponentControl-richcomponentControl_basic_usage.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ <para>
+ The example contains a single command button, which when clicked shows the modal
panel with the identifier <literal>ccModalPanelID</literal>.
+ </para>
+ </example>
+ </section>
+
+ <!--
+ <section
id="sect-Component_Reference-richcomponentControl-Attaching_to_a_component">
+ <title>Attaching to a component</title>
+ <para>
+ The <varname>attachTo</varname> attribute can be used to attach the event
to a component other than the parent component. If no
<varname>attachTo</varname> attribute is supplied, the
<sgmltag><rich:componentControl></sgmltag> component's
parent is used, as in <xref
linkend="exam-Component_Reference-richcomponentControl-richcomponentControl_basic_usage"
/>.
+ </para>
+ <example
id="exam-Component_Reference-richcomponentControl-Attaching_richcomponentControl_to_a_component">
+ <title>Attaching
<sgmltag><rich:componentControl></sgmltag> to a
component</title>
+ <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-richcomponentControl-Attaching_richcomponentControl_to_a_component.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ <para>
+ In the example, the <literal>click</literal> event of the component with
the identifier <literal>ccCalendarID</literal> will trigger the
<literal>Expand</literal> operation for the component with the identifier
<literal>doExpandCalendarID</literal>.
+ </para>
+ </example>
+ </section>
+ -->
+
+ <section
id="sect-Component_Reference-richcomponentControl-Passing_parameters_to_API_methods">
+ <title>Passing parameters to API methods</title>
+ <para>
+ The operation can receive parameters through nested
<sgmltag><f:param></sgmltag> elements.
+ </para>
+ <example
id="exam-Component_Reference-richcomponentControl-Using_parameters">
+ <title>Using parameters</title>
+ <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-richcomponentControl-Using_parameters-1.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ </example>
+ </section>
+
+ <section
id="sect-Component_Reference-richcomponentControl-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>:
<classname>org.richfaces.ComponentControl</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>:
<classname>org.richfaces.component.html.HtmlComponentControl</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>:
<classname>org.richfaces.ComponentControl</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>:
<classname>org.richfaces.ComponentControlRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>:
<classname>org.richfaces.taglib.ComponentControlTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ </section>
+
<section id="sect-Component_Reference-Functions-richclientId">
<title><function>rich:clientId</function></title>
<para>
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Validation.xml
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Validation.xml 2011-03-24
01:53:32 UTC (rev 22299)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Validation.xml 2011-03-24
06:34:34 UTC (rev 22300)
@@ -32,14 +32,11 @@
<section id="sect-Component_Reference-richvalidator-Basic_usage">
<title>Basic usage</title>
<para>
- The <sgmltag><rich:validator></sgmltag> behavior is added
as a child element to any input control. The value of the input control must reference a
managed bean. The <sgmltag><rich:validator></sgmltag> behavior
validates the content of the input control on the client-side based on registered
server-side validators included in the managed bean.
+ The <sgmltag><rich:validator></sgmltag> behavior is added
as a child element to any input control. The value of the input control must reference a
managed bean. The content of the input control validates on the client-side based on
registered server-side validators included in the managed bean.
</para>
<example id="exam-Component_Reference-richvalidator-Basic_usage">
<title>Basic usage</title>
<programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-richvalidator-Basic_usage.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- <para>
- The <sgmltag><rich:validator></sgmltag> behavior is added
to an <sgmltag><h:inputText></sgmltag> control. The validator
uses the registered server-side validators included in the managed bean referenced by the
input control.
- </para>
</example>
<note>
<title>JSF validation tags</title>
@@ -136,6 +133,9 @@
<para>
The <sgmltag><rich:graphValidator></sgmltag> component
performs a <methodname>clone()</methodname> method on the referenced bean
instance during the validation phase. The cloned object is validated and triggers any
required validation messages. As such, the model object remains clean, and the lifecycle
is interrupted properly after the <emphasis>Process Validations</emphasis>
phase.
</para>
+ <para>
+ Ensure the referenced object implements the
<interfacename>Cloneable</interfacename> interface, and allows a deep clone if
required.
+ </para>
</note>
<section id="sect-Component_Reference-richgraphValidator-Basic_usage">
Deleted:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jactionParam-a4jactionParam_example.js
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jactionParam-a4jactionParam_example.js 2011-03-24
01:53:32 UTC (rev 22299)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jactionParam-a4jactionParam_example.js 2011-03-24
06:34:34 UTC (rev 22300)
@@ -1,11 +0,0 @@
-public class ActionparamBean {
- private String name = "John";
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-}
Deleted:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jactionParam-a4jactionParam_example.xml_sample
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jactionParam-a4jactionParam_example.xml_sample 2011-03-24
01:53:32 UTC (rev 22299)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jactionParam-a4jactionParam_example.xml_sample 2011-03-24
06:34:34 UTC (rev 22300)
@@ -1,6 +0,0 @@
-<h:form id="form">
- <a4j:commandButton value="Set name to Alex"
reRender="rep">
- <a4j:actionparam name="username" value="Alex"
assignTo="#{actionparamBean.name}"/>
- </a4j:commandButton>
- <h:outputText id="rep" value="Name:
#{actionparamBean.name}"/>
-</h:form>
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jjsFunction-a4jjsFunction_example.xml_sample
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jjsFunction-a4jjsFunction_example.xml_sample 2011-03-24
01:53:32 UTC (rev 22299)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jjsFunction-a4jjsFunction_example.xml_sample 2011-03-24
06:34:34 UTC (rev 22300)
@@ -1,7 +1,28 @@
+<table width="400">
+ <tbody>
+ <tr>
+ <td>
+ <span onmouseover="updateName('Kate')"
+ onmouseout="updateName('')">Kate</span>
+ </td>
+ <td>
+ <span onmouseover="updateName('John')"
+ onmouseout="updateName('')">John</span>
+ </td>
+ <td>
+ <span onmouseover="updateName('Alex')"
+ onmouseout="updateName('')">Alex</span>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ Name: <b><h:outputText id="showname"
value="#{functionBean.text}" /></b>
+ </td>
+ </tr>
+ </tbody>
+</table>
<h:form>
- ...
- <a4j:jsFunction name="callScript" data="#{bean.someProperty1}"
reRender="someComponent" oncomplete="myScript(data.subProperty1,
data.subProperty2)">
- <a4j:actionParam name="param_name"
assignTo="#{bean.someProperty2}"/>
- </a4j:jsFunction>
- ...
+ <a4j:jsFunction name="updateName" render="showname">
+ <a4j:param name="name" assignTo="#{functionBean.text}"/>
+ </a4j:jsFunction>
</h:form>
Added:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jparam-Passing_client-side_parameters.xml_sample
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jparam-Passing_client-side_parameters.xml_sample
(rev 0)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jparam-Passing_client-side_parameters.xml_sample 2011-03-24
06:34:34 UTC (rev 22300)
@@ -0,0 +1,15 @@
+<h:form>
+ <a4j:commandButton value="Show Screen Size"
render="infoPanel">
+ <a4j:param name="w" value="screen.width"
+ assignTo="#{paramBean.screenWidth}" noEscape="true"
/>
+ <a4j:param name="h" value="screen.height"
+ assignTo="#{paramBean.screenHeight}" noEscape="true"
/>
+ </a4j:commandButton>
+
+ <h:panelGrid columns="2" id="infoPanel">
+ <h:outputText value="Width:" />
+ <h:outputText value="#{paramBean.screenWidth}" />
+ <h:outputText value="Height:" />
+ <h:outputText value="#{paramBean.screenHeight}" />
+ </h:panelGrid>
+</h:form>
Copied:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jparam-a4jparam_example.java
(from rev 22292,
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jactionParam-a4jactionParam_example.js)
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jparam-a4jparam_example.java
(rev 0)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jparam-a4jparam_example.java 2011-03-24
06:34:34 UTC (rev 22300)
@@ -0,0 +1,11 @@
+public class ParamBean {
+ private String name = "John";
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Copied:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jparam-a4jparam_example.xml_sample
(from rev 22292,
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jactionParam-a4jactionParam_example.xml_sample)
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jparam-a4jparam_example.xml_sample
(rev 0)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jparam-a4jparam_example.xml_sample 2011-03-24
06:34:34 UTC (rev 22300)
@@ -0,0 +1,6 @@
+<h:form id="form">
+ <a4j:commandButton value="Set name to Alex"
reRender="rep">
+ <a4j:param name="username" value="Alex"
assignTo="#{paramBean.name}"/>
+ </a4j:commandButton>
+ <h:outputText id="rep" value="Name: #{paramBean.name}"/>
+</h:form>
Added:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jpush-Basic_usage.java
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jpush-Basic_usage.java
(rev 0)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-a4jpush-Basic_usage.java 2011-03-24
06:34:34 UTC (rev 22300)
@@ -0,0 +1,24 @@
+public String getListSubtopic() {
+ return this.getUserName() + SUBTOPIC_SEPARATOR + channelName + "List";
+}
+
+@Override
+protected void onUserList(String channel, User[] users) {
+ try {
+ getTopicsContext().publish(new TopicKey("chat", getListSubtopic()),
null);
+ } catch (MessageException e) {
+ LOGGER.error(e.getMessage(), e);
+ }
+}
+
+@Override
+protected void onJoin(String channel, String sender, String login, String hostname) {
+ try {
+ getTopicsContext().publish(new TopicKey("chat", getListSubtopic()),
null);
+ Message messageObject = new Message("joined channel", sender,
+ DateFormat.getInstance().format(new Date()));
+ getTopicsContext().publish(new TopicKey("chat", getMessagesSubtopic()),
messageObject);
+ } catch (MessageException e) {
+ LOGGER.error(e.getMessage(), e);
+ }
+}
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richcomponentControl-Using_parameters-1.xml_sample
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richcomponentControl-Using_parameters-1.xml_sample 2011-03-24
01:53:32 UTC (rev 22299)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richcomponentControl-Using_parameters-1.xml_sample 2011-03-24
06:34:34 UTC (rev 22300)
@@ -1,3 +1,3 @@
-<rich:componentControl event="rowclick" for="menu"
operation="show">
- <f:param value="#{car.model}" name="model"/>
+<rich:componentControl event="click" target="modalPanel"
operation="show">
+ <f:param value="width" name="500"/>
</rich:componentControl>
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richcomponentControl-richcomponentControl_basic_usage.xml_sample
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richcomponentControl-richcomponentControl_basic_usage.xml_sample 2011-03-24
01:53:32 UTC (rev 22299)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richcomponentControl-richcomponentControl_basic_usage.xml_sample 2011-03-24
06:34:34 UTC (rev 22300)
@@ -1,4 +1,4 @@
<h:commandButton value="Show Modal Panel">
<!--componentControl is attached to the commandButton-->
- <rich:componentControl for="ccModalPanelID" event="click"
operation="show"/>
+ <rich:componentControl target="ccModalPanelID" event="click"
operation="show"/>
</h:commandButton>
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richgraphValidator-Basic_usage.js
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richgraphValidator-Basic_usage.js 2011-03-24
01:53:32 UTC (rev 22299)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richgraphValidator-Basic_usage.js 2011-03-24
06:34:34 UTC (rev 22300)
@@ -1,6 +1,6 @@
@ManagedBean
@RequestScoped
-public class UserBean {
+public class UserBean implements Cloneable {
@Size(min = 5, max = 15, message="Wrong size for password")
private String password;