Author: atsebro
Date: 2009-07-16 08:28:21 -0400 (Thu, 16 Jul 2009)
New Revision: 14937
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/commandButton.xml
Log:
RF-3427: component control not working on oncomplete event
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/commandButton.xml
===================================================================
---
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/commandButton.xml 2009-07-16
12:27:02 UTC (rev 14936)
+++
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/commandButton.xml 2009-07-16
12:28:21 UTC (rev 14937)
@@ -112,6 +112,25 @@
As any Core Ajax component that sends Ajax requests and processes
server responses the <emphasis
role="bold"><property><a4j:commandButton></property></emphasis>
has all attributes that provide the required behavior of requests (delay, limitation of
submit area and rendering, etc.)
</para>
+ <note>
+ <title>Note:</title>
+ <para>
+ When attaching a JavaScript API function to the <emphasis
role="bold"><property><a4j:commandButton></property></emphasis>
with the help of the <emphasis
role="bold"><property><rich:componentControl></property></emphasis>
do not use the
<emphasis><property>"attachTo"</property></emphasis>
attribute of the last one.
+ The attribute adds event handlers using
<code>Event.observe</code> but <emphasis
role="bold"><property><a4j:commandButton></property></emphasis>
has no such event.
+ The example below will not work:
+ </para>
+ <programlisting
role="XML"><![CDATA[<a4j:commandButton value="Show Current
Selection" reRender="table"
action="#{dataTableScrollerBean.takeSelection}" id="button">
+ <rich:componentControl attachTo="button" for="panel"
event="oncomplete" operation="show" />
+</a4j:commandButton>]]></programlisting>
+
+ <para>
+ This one should work properly:
+ </para>
+ <programlisting
role="XML"><![CDATA[<a4j:commandButton value="Show Current
Selection" reRender="table"
action="#{dataTableScrollerBean.takeSelection}" id="button">
+ <rich:componentControl for="panel" event="oncomplete"
operation="show" />
+</a4j:commandButton>]]></programlisting>
+ </note>
+
<para>
Information about the
<emphasis><property>"process"</property></emphasis>
attribute usage you can find in the "<link
linkend="process">Decide what to process</link>" guide
section.
</para>