Author: cluts
Date: 2008-03-17 10:43:13 -0400 (Mon, 17 Mar 2008)
New Revision: 6856
Modified:
trunk/docs/userguide/en/src/main/docbook/included/commandButton.xml
Log:
RF-926 - updated code for <a4j:commandButton> component
Modified: trunk/docs/userguide/en/src/main/docbook/included/commandButton.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/commandButton.xml 2008-03-17
14:22:35 UTC (rev 6855)
+++ trunk/docs/userguide/en/src/main/docbook/included/commandButton.xml 2008-03-17
14:43:13 UTC (rev 6856)
@@ -35,7 +35,9 @@
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="XML"><![CDATA[<a4j:commandButton
reRender="someData" action="#{bean.action1}"
value="Link"/>]]></programlisting>
+ <programlisting role="XML"><![CDATA[...
+<a4j:commandButton reRender="someData" action="#{bean.action1}"
value="Link"/>
+...]]></programlisting>
</section>
<section>
@@ -55,8 +57,9 @@
<para><emphasis
role="bold"><property><a4j:commandButton></property></emphasis>
is used in the same way as <emphasis
role="bold"><property><h:commandButton></property></emphasis>,
but with definition of the area that is updated after the response comes back from the
server.</para>
<para>This definition of the component provides a link, a click on the link
causes an Ajax form submit on the server, <property>action1</property> method
performance, and rendering of the component with <property>someData</property>
id after the response comes back from the server.</para>
<para>The component <emphasis
role="bold"><property><a4j:commandButton></property></emphasis>
placed on a page generates the following HTML code:</para>
- <programlisting role="JAVA"><![CDATA[<input
type="submit" onclick="A4J.AJAX.Submit(...request parameters);return
false;" value="sort"/>
-]]></programlisting>
+ <programlisting role="XML"><![CDATA[...
+<input type="submit" onclick="A4J.AJAX.Submit(...request
parameters);return false;" value="sort"/>
+...]]></programlisting>
<para>Hence, the utility method
<property>A4J.AJAX.Submit</property> is called on a click, the method performs
Ajax request as the <emphasis
role="bold"><property><a4j:support></property></emphasis>
component</para>
<note>
<title>Note:</title>
@@ -67,7 +70,7 @@
depends on the location of <emphasis
role="bold"><property><a4j:commandButton></property></emphasis>.
If the <property>commandButton</property> is situated outside the re-rendered
region
you can use keyword <property>'this'</property> as
in the following example:
</para>
- <programlisting role="JAVA"><![CDATA[...
+ <programlisting role="XML"><![CDATA[...
<h:form id="form">
<a4j:commandButton id="cbutton" action="director.rollCamera"
onclick="this.disabled=true"
@@ -80,7 +83,7 @@
the
<emphasis><property>"oncomplete"</property></emphasis>
attribute has a problem obtaining a reference of the
<property>commandButton</property> object
when using the keyword
<property>'this'</property>. In this case you can use the
<emphasis><property>"oncomplete"</property></emphasis>
attribute as in the following example:
</para>
- <programlisting role="JAVA"><![CDATA[...
+ <programlisting role="XML"><![CDATA[...
<h:form id="form">
<a4j:commandButton id="cbutton" action="director.rollCamera"
onclick="this.disabled=true"