From ajax4jsf-svn-commits at lists.jboss.org Mon Jul 9 09:37:49 2007 Content-Type: multipart/mixed; boundary="===============7976691572427811964==" MIME-Version: 1.0 From: ajax4jsf-svn-commits at lists.jboss.org To: ajax4jsf-svn-commits at lists.jboss.org Subject: [ajax4jsf-svn-commits] JBoss Ajax4JSF SVN: r303 - trunk/docs/userguide/en/src/main/docbook/included. Date: Mon, 09 Jul 2007 09:37:48 -0400 Message-ID: --===============7976691572427811964== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: vkorluzhenko Date: 2007-07-09 09:37:48 -0400 (Mon, 09 Jul 2007) New Revision: 303 Modified: trunk/docs/userguide/en/src/main/docbook/included/jsFunction.xml Log: http://jira.jboss.com/jira/browse/RF-421 Improved discription for jsFunction. Added ways of usage and link to exampl= e. Modified: trunk/docs/userguide/en/src/main/docbook/included/jsFunction.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 --- trunk/docs/userguide/en/src/main/docbook/included/jsFunction.xml 2007-0= 7-07 01:16:15 UTC (rev 302) +++ trunk/docs/userguide/en/src/main/docbook/included/jsFunction.xml 2007-0= 7-09 13:37:48 UTC (rev 303) @@ -1,36 +1,36 @@ - = - - Component identification parameters - - - - Name - Value - - - - - component-type - org.ajax4jsf.ajax.Function - - - component-family - org.ajax4jsf.components.AjaxFunction - - - component-class - org.ajax4jsf.ajax.html.HtmlAjaxFunction - - - renderer-type - org.ajax4jsf.components.AjaxFunctionRenderer - - - -
- = + + + Component identification parameters + + + + Name + Value + + + + + component-type + org.ajax4jsf.ajax.Function + + + component-family + org.ajax4jsf.components.AjaxFunction + + + component-class + org.ajax4jsf.ajax.html.HtmlAjaxFunction + + + renderer-type + org.ajax4jsf.components.AjaxFunctionRenderer + + + +
+
Creating on a page Simple component definition example: @@ -45,10 +45,9 @@ ...]]> - - The script "myScript" will be called after bean.some= Property data = - will be returned from server(e.g. It'll be object with two subprope= rties). = - + The script "myScript" will be called after + bean.someProperty data will be returned from se= rver(e.g. It'll + be object with two subproperties).
Dynamical creation of a component from Java code @@ -60,11 +59,55 @@
Key attributes and ways of usage - - As the component uses Ajax request to get data from server - it has = all = - common Ajax Action attributes. So, action and actionListener can be = - invoked, and reRendering some parts of the page fired after calling = - function. - -
-
= \ No newline at end of file + As the component uses Ajax request to get data from server - it= has all common Ajax + Action attributes. So, action and actionListener can be invoked, and= reRendering some parts of + the page fired after calling function. + When using the + <a4j:jsFunction> + it's possible to initiate the AJAX request from the= JavaScript and + perform partial update of a page and/or invoke the JavaScript functi= on with data returned by + AJAX response. + + ... + + ... + + + + + ... + + ... + +...]]> + The + <a4j:jsFunction> + allows to use + <a4j:actionparam> + or pure + <f:param> + for passing any number of parameters of the JavaScript f= unction into AJAX request. + + <a4j:jsFunction> + is similar to + <a4j:commandButton> + , but it could be activated from the JavaScript code. It = allows to invoke some + server side functionality and use the returned data in the JavaScrip= t function invoked from + "oncomplete" attribute. So it's possible to use + <a4j:jsFunction> + instead of + <a4j:commandButton> + . You can put it anywhere, just don't forget to use + <h:form> =E2=80=A6 </h:form> around it. + +
+ Relevant resources links + To see how + <a4j:jsFunction> + works on practice, look at a4j-jsFunction example from <= ulink + url=3D"http://labs.jboss.com/jbossajax4jsf/demo/index.html">here. +
+ --===============7976691572427811964==--