[richfaces-svn-commits] JBoss Rich Faces SVN: r2148 - trunk/docs/ajaxguide/en/src/main/docbook/included.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Wed Aug 8 10:24:29 EDT 2007
Author: vkukharchuk
Date: 2007-08-08 10:24:29 -0400 (Wed, 08 Aug 2007)
New Revision: 2148
Modified:
trunk/docs/ajaxguide/en/src/main/docbook/included/ajaxListener.xml
Log:
http://jira.jboss.com/jira/browse/AJSF-107
Modified: trunk/docs/ajaxguide/en/src/main/docbook/included/ajaxListener.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/ajaxListener.xml 2007-08-08 13:45:52 UTC (rev 2147)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/ajaxListener.xml 2007-08-08 14:24:29 UTC (rev 2148)
@@ -28,7 +28,7 @@
</tgroup>
</table>
- <!--
+
<section>
<title>Creating on a page</title>
<para>Simple Component definition on a page:</para>
@@ -37,14 +37,14 @@
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="XML"><![CDATA[<a4j:ajaxListenet type=""/>
+ <programlisting role="XML"><![CDATA[...
+ <a4j:ajaxListener type="demo.Bean"/>
+...
]]></programlisting>
</section>
- -->
-
+
<section>
<title>Dynamical creation of a component from Java code</title>
-
<para>
<emphasis role="bold">Example:</emphasis>
<programlisting role="JAVA"><![CDATA[import org.ajax4jsf.component.html.AjaxListener;
@@ -66,9 +66,42 @@
a good place for update the list of re-rendered components, for example.
Ajax Listener is not invoked for non-Ajax request and when RichFaces works in "Ajax Request generates
Non-Ajax Response" mode. Therefore, Ajax Listener invocation is a good indicator that Ajax response is going to be processed.
-Attribute 'type' defines the fully qualified Java class name for listener. This class should implement org.ajax4jsf.events.AjaxListener interface.
-You can access to the source of the event (Ajax component) using event.getSource() call.
+Attribute 'type' defines the fully qualified Java class name for listener. This class should implement org.ajax4jsf.framework.ajax.AjaxListener
+interface. You can access to the source of the event (Ajax component) using event.getSource() call.
</para>
- </section>
+ </section>
+ <section>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+
+ <programlisting role="XML"><![CDATA[...
+
+ <a4j:commandLink id="cLink" value="Click it To Send Ajax Request">
+ <a4j:ajaxListener type="demo.Bean"/>
+ </a4j:commandLink>
+...
+]]></programlisting>
+
+<para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+
+ <programlisting role="XML"><![CDATA[
+package demo;
+
+import org.ajax4jsf.framework.ajax.AjaxEvent;
+
+public class Bean implements org.ajax4jsf.framework.ajax.AjaxListener{
+
+...
+ public void processAjax(AjaxEvent arg0){
+ //Custom Developer Code
+ }
+...
+}
+]]></programlisting>
+ </section>
+
</chapter>
\ No newline at end of file
More information about the richfaces-svn-commits
mailing list