From richfaces-svn-commits at lists.jboss.org Wed Mar 2 19:23:15 2011 Content-Type: multipart/mixed; boundary="===============2262370635726316505==" MIME-Version: 1.0 From: richfaces-svn-commits at lists.jboss.org To: richfaces-svn-commits at lists.jboss.org Subject: [richfaces-svn-commits] JBoss Rich Faces SVN: r22026 - modules/docs/trunk/Component_Reference/src/main/docbook/en-US. Date: Wed, 02 Mar 2011 19:23:15 -0500 Message-ID: <201103030023.p230NFDr009304@svn01.web.mwc.hst.phx2.redhat.com> --===============2262370635726316505== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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-Compo= nent_Reference-Common_Ajax_attributes.xml Log: Revised event descriptions Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/cha= p-Component_Reference-Common_Ajax_attributes.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Comp= onent_Reference-Common_Ajax_attributes.xml 2011-03-02 17:34:29 UTC (rev 220= 25) +++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Comp= onent_Reference-Common_Ajax_attributes.xml 2011-03-03 00:23:14 UTC (rev 220= 26) @@ -143,60 +143,60 @@
Events and JavaScript interactions - RichFaces allows for Ajax-enabled JSF applications t= o 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 JSF applications t= o be developed without using any additional JavaScript code. However it is = still possible to invoke custom JavaScript code through Ajax events using e= vent listeners. -
- <varname>onsubmit</varname> +
+ <varname>submit</varname> - The onsubmit attribute invokes the JavaScript code = before the Ajax request is sent. The request is cancel= ed if the JavaScript code defined for onsubmit returns <= literal>false. + The submit event attribute invokes the event listen= er before the Ajax request is sent. The request is can= celed if the event listener defined for submit event ret= urns false.
= -
- <varname>onbegin</varname> +
+ <varname>begin</varname> - The onbegin attribute invokes the JavaScript code <= emphasis>after the Ajax request is sent. + The begin event attribute invokes the event listene= r after the Ajax request is sent.
= -
- <varname>onclick</varname> +
+ <varname>click</varname> - The onclick attribute functions similarly to the onsubmit attribute for those components that can be clicke= d, such as <a4j:commandButton> and <a4= j:commandLink>. It invokes the defined JavaScript before the A= jax request, and the request will be canceled if the defined code returns <= literal>false. + The click event attribute functions similarly to th= e submit event attribute for those components that can b= e clicked, such as <a4j:commandButton> and <a4j:commandLink>. It invokes the defined JavaScript befo= re the Ajax request, and the request will be canceled if the defined code r= eturns false.
= -
- <varname>onsuccess</varname> +
+ <varname>success</varname> - The onsuccess attribute invokes the JavaScript code= after the Ajax response has been returned but before = the DOM tree of the browser has been updated. + The success event attribute invokes the event liste= ner after the Ajax response has been returned but before the DOM tree of the browser has been updated.
= -
- <varname>oncomplete</varname> +
+ <varname>complete</varname> - The oncomplete attribute invokes the JavaScript cod= e after the Ajax response has been returned and the DOM tree of the browser has been updated. + The complete event attribute invokes the event list= ener after the Ajax response has been returned and the= DOM tree of the browser has been updated. Reference consistency - The code is registered for further invocation of the XMLHTTP= request object before an Ajax request is sent. As such, using JSF Expression Language (EL) value bind= ing means the code will not be changed during processing of the request on = the server. Additionally the oncomplete attribute cannot= use the this keyword as it will not point to the compon= ent from which the Ajax request was initiated. + The code is registered for further invocation of the XMLHTTP= request object before an Ajax request is sent. As such, using JSF Expression Language (EL) value bind= ing means the code will not be changed during processing of the request on = the server. Additionally the complete event attribute ca= nnot use the this keyword as it will not point to the co= mponent from which the Ajax request was initiated.
= -
- <varname>onerror</varname> +
+ <varname>error</varname> - The onerror attribute invokes the JavaScript code w= hen an error has occurred during Ajax communications. + The error event attribute invokes the event listene= r when an error has occurred during Ajax communications.
=
<varname>data</varname> - The data attribute allows the use of additional dat= a during an Ajax call. JSF Expression Language (EL) can be used to reference the property of the managed bean, a= nd its value will be serialized in JavaScript Object Notation (JSO= N) and returned to the client side. The property can then be refe= renced through the data variable in the event attribute = definitions. Both primitive types and complex types such as arrays and coll= ections can be serialized and used with data. + The data event attribute allows the use of addition= al data during an Ajax call. JSF Expression Language (EL) can be used to reference the property of the managed b= ean, and its value will be serialized in JavaScript Object Notation (JSON) and returned to the client side. The property can then b= e referenced through the data variable in the event attr= ibute definitions. Both primitive types and complex types such as arrays an= d collections can be serialized and used with data. Data reference example --===============2262370635726316505==--