From richfaces-svn-commits at lists.jboss.org Fri Mar 18 01:34:24 2011 Content-Type: multipart/mixed; boundary="===============0912287986518377975==" MIME-Version: 1.0 From: richfaces-svn-commits at lists.jboss.org To: richfaces-svn-commits at lists.jboss.org Subject: [richfaces-svn-commits] JBoss Rich Faces SVN: r22261 - in modules/docs/trunk/Component_Reference/src/main/docbook/en-US: extras and 1 other directory. Date: Fri, 18 Mar 2011 01:34:24 -0400 Message-ID: <201103180534.p2I5YOVd028580@svn01.web.mwc.hst.phx2.redhat.com> --===============0912287986518377975== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: SeanRogers Date: 2011-03-18 01:34:23 -0400 (Fri, 18 Mar 2011) New Revision: 22261 Added: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exa= m-Component_Reference-a4jpush-Basic_usage.xml_sample modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exa= m-Component_Reference-a4jpush-Handling_a_push_notification.xml_sample Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Compo= nent_Reference-Actions.xml Log: Updated push documentation Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/cha= p-Component_Reference-Actions.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Comp= onent_Reference-Actions.xml 2011-03-18 02:12:38 UTC (rev 22260) +++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Comp= onent_Reference-Actions.xml 2011-03-18 05:34:23 UTC (rev 22261) @@ -575,10 +575,56 @@ =
<sgmltag><a4j:push></sgmltag> + + + The <a4j:push> component performs real-time up= dates on the client side from events raised at the server side. The events = are pushed out to the client through the Java Message Service (JMS= ). When the <a4j:push> component is trig= gered by a server event, it can in turn cause Ajax updates and changes. + + +
+ Basic usage + + RichFaces requires the use of the jquery-atmosphere.js client plug-in for push functionality. The plug-in is added automatic= ally by the push component renderer, but needs to additionally be added as = a build dependency to your project. + + + The JMS instance on the back-end must be configured to work with your = <a4j:push> components. Create topics on the JMS se= rver for the push functionality to check for new messages. Refer to JMS Documentation for details on configuring JMS. + + + Use the <a4j:push> component's addre= ss attribute to reference the topic on the JMS server that contai= ns the pushed messages. + + + The <a4j:push> component should also include = the error event attribute to inform the user when an err= or has occurred with the push notifications. + + + Basic usage + + + The example demonstrates a simple use of the <a4j:push>= ; component to manage a list of users in a chat room. The <a4j:push> component refers to the #{chatBean.listS= ubtopic}@chat address, which has been created on the JMS server. Whe= n a new message arrives, the <a4j:ajax> behavior c= auses the user list to update. If an error occurs, the user is alerted. + + +
+ +
+ Handling a push notification + + A push notification sent to the <a4j:push> be= havior will cause it to trigger any <a4j:ajax> com= ponents attached as sub-elements. Alternatively, use the dataavail= able event attribute to define a handler. = + + + Handling a push notification + + + The example uses the dataavailable event attribute= with JavaScript to update messages in a chat room. + + +
+ + =
Reference data Added: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras= /exam-Component_Reference-a4jpush-Basic_usage.xml_sample =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-a4jpush-Basic_usage.xml_sample = (rev 0) +++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-a4jpush-Basic_usage.xml_sample 2011-03-18 05:34:23 U= TC (rev 22261) @@ -0,0 +1,8 @@ + + #{user.nick} + +... + + + Added: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras= /exam-Component_Reference-a4jpush-Handling_a_push_notification.xml_sample =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-a4jpush-Handling_a_push_notification.xml_sample = (rev 0) +++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-a4jpush-Handling_a_push_notification.xml_sample 2011= -03-18 05:34:23 UTC (rev 22261) @@ -0,0 +1,5 @@ + --===============0912287986518377975==--