Author: atsebro
Date: 2009-07-07 08:28:28 -0400 (Tue, 07 Jul 2009)
New Revision: 14805
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/commandLink.xml
Log:
RF-7480: a4j:htmlCommandLink component description review
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/commandLink.xml
===================================================================
---
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/commandLink.xml 2009-07-07
12:27:25 UTC (rev 14804)
+++
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/commandLink.xml 2009-07-07
12:28:28 UTC (rev 14805)
@@ -65,17 +65,38 @@
<para>
The <emphasis
role="bold"><property><a4j:commandLink></property></emphasis>
component is used in the same way as JSF <emphasis
role="bold"><property><h:commandLink></property></emphasis>.
The difference is that in case of <emphasis
role="bold"><property><a4j:commandLink></property></emphasis>
the components to be updated should be specified.
+ In this chapter we will use the code from <link
linkend="RichFacesGreeterindex">RichFaces Greeter</link> and change
there <emphasis
role="bold"><property><a4j:commandButton></property></emphasis>
to <emphasis
role="bold"><property><a4j:commandLink></property></emphasis>:
</para>
+ <programlisting role="XML"><![CDATA[...
+<a4j:commandLink value="Get greeting" reRender="greeting" />
+...]]></programlisting>
+
<para>
+ It's not necessary to add nested <emphasis
role="bold"><property><a4j:support></property></emphasis>
as the <emphasis
role="bold"><property><a4j:commandLink></property></emphasis>
has an Ajax support already built-in.
+ As a result of our changes we will get a form with "Get
greeting" link instead of the button:
+ </para>
+ <figure>
+ <title>
+ The RicjFaces greeter with <emphasis
role="bold"><property><a4j:commandLink></property></emphasis>
+ </title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/commandLink_init.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
The example <link linkend="CL_example">above</link>
generates the following HTML code:
</para>
- <programlisting role="XML"><![CDATA[<a href="#"
onclick="A4J.AJAX.Submit(?"request parameters"); return
false;"><span>Follow this
link</span></a>]]></programlisting>
+ <programlisting role="XML"><![CDATA[<a href="#"
onclick="A4J.AJAX.Submit(?"request parameters"); return
false;"><span>Get
greeting</span></a>]]></programlisting>
<para>
If you click on the generated anchor the utility method
<code>A4J.AJAX.Submit()</code> will be fired.
- It's not necessary to add nested <emphasis
role="bold"><property><a4j:support></property></emphasis>
as the <emphasis
role="bold"><property><a4j:commandLink></property></emphasis>
has an Ajax support already built-in.
+
</para>
<note>
Show replies by date