From richfaces-svn-commits at lists.jboss.org Thu Sep 10 07:19:51 2009 Content-Type: multipart/mixed; boundary="===============4578941727802548469==" 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: r15522 - branches/community/3.3.X/docs/userguide/en/src/main/docbook/included. Date: Thu, 10 Sep 2009 07:19:51 -0400 Message-ID: <200909101119.n8ABJpba000610@svn01.web.mwc.hst.phx2.redhat.com> --===============4578941727802548469== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: artdaw Date: 2009-09-10 07:19:50 -0400 (Thu, 10 Sep 2009) New Revision: 15522 Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/a4j= _actionparam.xml branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/a4j= _ajaxListener.xml branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/a4j= _form.xml Log: https://jira.jboss.org/jira/browse/RF-7275 - was fixed Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/inclu= ded/a4j_actionparam.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 --- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/a4= j_actionparam.xml 2009-09-10 08:21:49 UTC (rev 15521) +++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/a4= j_actionparam.xml 2009-09-10 11:19:50 UTC (rev 15522) @@ -1,109 +1,160 @@
- - < - a4j:actionparam - > - <emphasis role=3D"since"> - <superscript> available since <emphasis role=3D"version">3.0.0</e= mphasis> - </superscript> - </emphasis> - -
- + + < + a4j:actionparam + > + <emphasis role=3D"since"> + <superscript>available since + <emphasis role=3D"version">3.0.0</emphasis> + </superscript> + </emphasis> + +
+ - a4j:actionparam + a4j:actionparam - - Description - - The - <a4j:actionparam> - component combines the functionality of both JSF - <f:param> - and - <f:actionListener> - = - and allows to assign the value to the property of the manager = bean directly using the - assignTo - attribute. - + + Description + + The + + <a4j:actionparam> + + component combines the functionality of + + <f:param> + + and + + <f:actionListener> + + and allows to assign the value to the property of the managed = bean directly using the + + "assignTo" + + attribute. + = -
-
+
+
Details of Usage - - The component - <a4j:actionparam> - is a combination of the functionality of two JSF tags= : = - - <f:param> - and - <f:actionListener> - . - - At the render phase, it's decoded by parent component ( - <h:commandLink> - or like) as usual. = - At the process request phase, if the parent component perfor= ms an action event, update the - "value" - specified in the = - - "assignTo" - attribute as its - "value" - . = - If a - "converter" - attribute is specified, use it to encode and decode t= he - "value" - to a string stored in the html parameter. = - To make the - "assignTo" - attribute usable add the actionParam ins= tance to the parent component as an action listener. + + The + + <a4j:actionparam> + + component has 3 main attributes: + + + + + "name" + + defines a name of this parameter + + + + + + "value" + + defines initial value of this parameter or a value bin= ding + + + + + + "assignTo" + + defines updatable bean property. This property will be= updated if the parent + command component performs an actionEvent during the &= quot;Process Request" phase. + + + - - <a4j:actionparam> - has a - "noEscape" - attribute. = - If it is set to "true", the - "value" - is evaluated as a JavaScript code. + Example: + + + + + +
+ + +...]]>
- Example: + There is a managed bean: - - ... - var foo =3D "bar"; - ... - -... - + - - The - <a4j:param> - extends - <f:param> - , = - so the - "name" - attribute is mandatory. = - Otherwise, the - "value" - misses due missing the request parameter name for it. - = + + You can use + + <a4j:actionparam> + + not only with Ajax components, but with non-ajax command compo= nent also. + This feature allows to update model values without invoking ev= en a single line of Java code on the + server side. The usage of this feature you can find at + + ActionParameter Usage + + page of RichFaces LiveDemo. + + + If you need to convert the value before the "Update Model= " phase + you can specify the converter in the + + "converter" + + attribute. + + + Note: + + The property is assigned with a parameter value on the &qu= ot;Update Model" phase. Therefore if the + validation of the form is failed, this phase will be skipp= ed and the property won't be updated. + + + + It is possible to use JavaScript expression or function in the + + "value" + + attribute. + In this case the + + "noEscape" + + attribute should be set to "true". + The result of this JavaScript invocation is sent to the server= as a value of + + <a4j:actionparam> + + . +
-
- Reference Data - - Table of = - <a4j:actionparam> = - attributes. - - +
+ Reference Data + + Table of + <a4j:actionparam> + attributes. + +
Component Identification Parameters @@ -117,31 +168,42 @@ component-typeorg.ajax4jsf.ActionParameter - = + component-class org.ajax4jsf.component.html.HtmlActionParam= eter - = +
-
-
- Relevant Resources Links +
+
+ Relevant Resources Links - Visit the ActionParamter page at RichFaces LiveDemo for examples of component usage abd their sources. = + Visit the + + ActionParameter + page at RichFaces LiveDemo for examples of component usage and= their sources. - More information can be found on the Ajax= 4jsf Users Forum. - = + More information can be found on the + Ajax4jsf Users + Forum. + - More information about - <f:param> - and - <f:actionListener> - can be found in Sun JSF TLD documentation. + More information about + + <f:param> + + and + + <f:actionListener> + + can be found in + Sun JSF + TLD documentation. - = -
+
\ No newline at end of file Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/inclu= ded/a4j_ajaxListener.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 --- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/a4= j_ajaxListener.xml 2009-09-10 08:21:49 UTC (rev 15521) +++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/a4= j_ajaxListener.xml 2009-09-10 11:19:50 UTC (rev 15522) @@ -70,9 +70,7 @@ The object on which the Event initially occurred could be acce= ssed using the - java.util.EventObject.getSource() - - + java.util.EventObject.getSource()= method. @@ -95,7 +93,7 @@ = - + @@ -172,12 +170,12 @@ Visit - AjaxListener - + AjaxListener page at RichFaces Livedemo for examples of component usage and= their sources. - Check Sun JSF TLD documentation for more information on<f:valueChangeListener> tag. Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/inclu= ded/a4j_form.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 --- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/a4= j_form.xml 2009-09-10 08:21:49 UTC (rev 15521) +++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/a4= j_form.xml 2009-09-10 11:19:50 UTC (rev 15522) @@ -206,9 +206,10 @@ at RichFaces Livedemo for examples of component usage and thei= r sources. - For additional information about attributes of this component = read'Ajax - Attribute' section. + Attribute section. \ No newline at end of file --===============4578941727802548469==--