Author: SeanRogers
Date: 2011-03-02 19:23:14 -0500 (Wed, 02 Mar 2011)
New Revision: 22026
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Common_Ajax_attributes.xml
Log:
Revised event descriptions
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Common_Ajax_attributes.xml
===================================================================
---
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Common_Ajax_attributes.xml 2011-03-02
17:34:29 UTC (rev 22025)
+++
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Common_Ajax_attributes.xml 2011-03-03
00:23:14 UTC (rev 22026)
@@ -143,60 +143,60 @@
<section
id="sect-Component_Reference-Common_Ajax_attributes-Events_and_JavaScript_interactions">
<title>Events and JavaScript interactions</title>
<para>
- RichFaces allows for Ajax-enabled <acronym>JSF</acronym> applications to
be developed without using any additional JavaScript code. However it is still possible to
invoke custom JavaScript code through Ajax events.
+ RichFaces allows for Ajax-enabled <acronym>JSF</acronym> applications to
be developed without using any additional JavaScript code. However it is still possible to
invoke custom JavaScript code through Ajax events using event listeners.
</para>
- <section
id="sect-Component_Reference-Events_and_JavaScript_interactions-onsubmit">
- <title><varname>onsubmit</varname></title>
+ <section
id="sect-Component_Reference-Events_and_JavaScript_interactions-submit">
+ <title><varname>submit</varname></title>
<para>
- The <varname>onsubmit</varname> attribute invokes the JavaScript code
<emphasis>before</emphasis> the Ajax request is sent. The request is canceled
if the JavaScript code defined for <varname>onsubmit</varname> returns
<literal>false</literal>.
+ The <varname>submit</varname> event attribute invokes the event listener
<emphasis>before</emphasis> the Ajax request is sent. The request is canceled
if the event listener defined for <varname>submit</varname> event returns
<literal>false</literal>.
</para>
</section>
- <section
id="sect-Component_Reference-Events_and_JavaScript_interactions-onbegin">
- <title><varname>onbegin</varname></title>
+ <section
id="sect-Component_Reference-Events_and_JavaScript_interactions-begin">
+ <title><varname>begin</varname></title>
<para>
- The <varname>onbegin</varname> attribute invokes the JavaScript code
<emphasis>after</emphasis> the Ajax request is sent.
+ The <varname>begin</varname> event attribute invokes the event listener
<emphasis>after</emphasis> the Ajax request is sent.
</para>
</section>
- <section
id="sect-Component_Reference-Events_and_JavaScript_interactions-onclick">
- <title><varname>onclick</varname></title>
+ <section
id="sect-Component_Reference-Events_and_JavaScript_interactions-click">
+ <title><varname>click</varname></title>
<para>
- The <varname>onclick</varname> attribute functions similarly to the
<varname>onsubmit</varname> attribute for those components that can be
clicked, such as <sgmltag><a4j:commandButton></sgmltag> and
<sgmltag><a4j:commandLink></sgmltag>. It invokes the defined
JavaScript before the Ajax request, and the request will be canceled if the defined code
returns <literal>false</literal>.
+ The <varname>click</varname> event attribute functions similarly to the
<varname>submit</varname> event attribute for those components that can be
clicked, such as <sgmltag><a4j:commandButton></sgmltag> and
<sgmltag><a4j:commandLink></sgmltag>. It invokes the defined
JavaScript before the Ajax request, and the request will be canceled if the defined code
returns <literal>false</literal>.
</para>
</section>
- <section
id="sect-Component_Reference-Events_and_JavaScript_interactions-onsuccess">
- <title><varname>onsuccess</varname></title>
+ <section
id="sect-Component_Reference-Events_and_JavaScript_interactions-success">
+ <title><varname>success</varname></title>
<para>
- The <varname>onsuccess</varname> attribute invokes the JavaScript code
after the Ajax response has been returned but <emphasis>before</emphasis> the
<acronym>DOM</acronym> tree of the browser has been updated.
+ The <varname>success</varname> event attribute invokes the event listener
after the Ajax response has been returned but <emphasis>before</emphasis> the
<acronym>DOM</acronym> tree of the browser has been updated.
</para>
</section>
- <section
id="sect-Component_Reference-Events_and_JavaScript_interactions-oncomplete">
- <title><varname>oncomplete</varname></title>
+ <section
id="sect-Component_Reference-Events_and_JavaScript_interactions-complete">
+ <title><varname>complete</varname></title>
<para>
- The <varname>oncomplete</varname> attribute invokes the JavaScript code
after the Ajax response has been returned <emphasis>and</emphasis> the
<acronym>DOM</acronym> tree of the browser has been updated.
+ The <varname>complete</varname> event attribute invokes the event
listener after the Ajax response has been returned <emphasis>and</emphasis>
the <acronym>DOM</acronym> tree of the browser has been updated.
</para>
<note>
<title>Reference consistency</title>
<para>
- The code is registered for further invocation of the
<acronym>XMLHTTP</acronym> request object before an Ajax request is sent. As
such, using <acronym>JSF</acronym> Expression Language
(<acronym>EL</acronym>) value binding means the code will not be changed
during processing of the request on the server. Additionally the
<varname>oncomplete</varname> attribute cannot use the
<literal>this</literal> keyword as it will not point to the component from
which the Ajax request was initiated.
+ The code is registered for further invocation of the
<acronym>XMLHTTP</acronym> request object before an Ajax request is sent. As
such, using <acronym>JSF</acronym> Expression Language
(<acronym>EL</acronym>) value binding means the code will not be changed
during processing of the request on the server. Additionally the
<varname>complete</varname> event attribute cannot use the
<literal>this</literal> keyword as it will not point to the component from
which the Ajax request was initiated.
</para>
</note>
</section>
- <section
id="sect-Component_Reference-Events_and_JavaScript_interactions-onerror">
- <title><varname>onerror</varname></title>
+ <section
id="sect-Component_Reference-Events_and_JavaScript_interactions-error">
+ <title><varname>error</varname></title>
<para>
- The <varname>onerror</varname> attribute invokes the JavaScript code when
an error has occurred during Ajax communications.
+ The <varname>error</varname> event attribute invokes the event listener
when an error has occurred during Ajax communications.
</para>
</section>
<section
id="sect-Component_Reference-Events_and_JavaScript_interactions-data">
<title><varname>data</varname></title>
<para>
- The <varname>data</varname> attribute allows the use of additional data
during an Ajax call. <acronym>JSF</acronym> Expression Language
(<acronym>EL</acronym>) can be used to reference the property of the managed
bean, and its value will be serialized in JavaScript Object Notation
(<acronym>JSON</acronym>) and returned to the client side. The property can
then be referenced through the <varname>data</varname> variable in the event
attribute definitions. Both primitive types and complex types such as arrays and
collections can be serialized and used with <varname>data</varname>.
+ The <varname>data</varname> event attribute allows the use of additional
data during an Ajax call. <acronym>JSF</acronym> Expression Language
(<acronym>EL</acronym>) can be used to reference the property of the managed
bean, and its value will be serialized in JavaScript Object Notation
(<acronym>JSON</acronym>) and returned to the client side. The property can
then be referenced through the <varname>data</varname> variable in the event
attribute definitions. Both primitive types and complex types such as arrays and
collections can be serialized and used with <varname>data</varname>.
</para>
<example id="exam-Component_Reference-data-Data_reference_example">
<title>Data reference example</title>
Show replies by date