Author: vkorluzhenko
Date: 2007-07-17 08:54:21 -0400 (Tue, 17 Jul 2007)
New Revision: 1657
Added:
trunk/docs/ajaxguide/en/src/main/docbook/included/actionparam.xml
Log:
http://jira.jboss.com/jira/browse/AJSF-104
Added: trunk/docs/ajaxguide/en/src/main/docbook/included/actionparam.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/actionparam.xml
(rev 0)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/actionparam.xml 2007-07-17 12:54:21
UTC (rev 1657)
@@ -0,0 +1,86 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter>
+ <para>
+ <table frame="all">
+ <title>Component identification parameters</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Value</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>component-type</entry>
+ <entry>org.ajax4jsf.ajax.ActionParameter</entry>
+ </row>
+ <row>
+ <entry>component-family</entry>
+ <entry> </entry>
+ </row>
+ <row>
+ <entry>component-class</entry>
+
<entry>org.ajax4jsf.ajax.html.HtmlActionParameter</entry>
+ </row>
+ <row>
+ <entry>renderer-type</entry>
+ <entry> </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </para>
+ <section>
+ <title>Creating on a page</title>
+ <para>Simple component definition example:</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[<a4j:actionParam
noEscape="true" name="param1" value="getMyValue()"
assignTo="#{bean.prop1}" />]]></programlisting>
+ </section>
+ <section>
+ <title>Dynamical creation of a component from Java code</title>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="JAVA"><![CDATA[import
org.ajax4jsf.ajax.html.HtmlActionParameter;
+...
+HtmlActionParameter myActionParameter = new HtmlActionParameter();
+...
+]]></programlisting>
+ </section>
+ <section>
+ <title>Key attributes and ways of usage</title>
+ <para>The component <emphasis role="bold">
+ <property><a4j:actionparam></property>
+ </emphasis> is a combination of the functionality of two JSF tags:
<emphasis role="bold">
+ <property><f:param></property>
+ </emphasis> and <emphasis role="bold">
+ <property><f:actionListener></property>
+ </emphasis>.</para>
+ <para>At the render phase, it's decoded by parent component
(<emphasis role="bold">
+ <property><h:commandLink></property>
+ </emphasis> or like) as usual. At the process request phase, if the
parent component
+ performs 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 the value to a string stored in the html parameter.</para>
+ <para><emphasis role="bold">
+ <property><a4j:actionparam></property>
+ </emphasis>has a "noEscape" attribute. If it is set
to
+ "true", the value will be evaluated as a JavaScript code.
</para>
+ <emphasis role="bold">Example:</emphasis>
+ <programlisting role="XML"><![CDATA[...
+ <script>
+ ...
+ var foo = "bar";
+ ...
+ </script>
+ ...
+ <a4j:actionParam noEscape="true" name="param1"
value="foo" assignTo="#{bean.prop1}" />
+...]]></programlisting>
+ <para>More information can be found on the <ulink
+
url="http://www.jboss.com/index.html?module=bb&op=viewtopic&...
+ >Ajax4JSF Users Forum</ulink>.</para>
+ </section>
+</chapter>