From richfaces-svn-commits at lists.jboss.org Fri Nov 30 11:34:01 2007 Content-Type: multipart/mixed; boundary="===============0635930494187439860==" 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: r4394 - trunk/docs/userguide/en/src/main/docbook/included. Date: Fri, 30 Nov 2007 11:34:00 -0500 Message-ID: --===============0635930494187439860== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: vkorluzhenko Date: 2007-11-30 11:34:00 -0500 (Fri, 30 Nov 2007) New Revision: 4394 Modified: trunk/docs/userguide/en/src/main/docbook/included/poll.xml trunk/docs/userguide/en/src/main/docbook/included/push.xml Log: http://jira.jboss.com/jira/browse/RF-657 - improved description. Modified: trunk/docs/userguide/en/src/main/docbook/included/poll.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 --- trunk/docs/userguide/en/src/main/docbook/included/poll.xml 2007-11-30 1= 5:10:24 UTC (rev 4393) +++ trunk/docs/userguide/en/src/main/docbook/included/poll.xml 2007-11-30 1= 6:34:00 UTC (rev 4394) @@ -66,7 +66,7 @@ componet is used for periodical polling of server data. = In order to use the component it's necessary to set an update interval. The "interval" - attribute defines an interval in milliseconds beetween t= he previous + attribute defines an interval in milliseconds between th= e previous response and the next request. The total period beetween two request= s generated by the <a4j:poll> @@ -78,7 +78,7 @@ the "Creating on a page" sectio= n. The "timeout" - attribute defines response wating time in milliseconds. = If the response + attribute defines response waiting time in milliseconds.= If a response isn't received during this period a connection is aborted and t= he next request is sent. Default value for "timeout" Modified: trunk/docs/userguide/en/src/main/docbook/included/push.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 --- trunk/docs/userguide/en/src/main/docbook/included/push.xml 2007-11-30 1= 5:10:24 UTC (rev 4393) +++ trunk/docs/userguide/en/src/main/docbook/included/push.xml 2007-11-30 1= 6:34:00 UTC (rev 4394) @@ -49,30 +49,83 @@ Key attributes and ways of usage The <a4j:push> - component is similar to the - <a4j:poll> - - one. The main difference is that th= e + implements reverse Ajax technique. The component makes r= equests to minimal code + (not to JSF tree) in order to check presence of messages in a queue.= If a message exists, a + complete request is performed. + <a4j:push> + registers EventListener in the bean, + which receives messages about an event presence. + + The bean, for example, could be subscribed to Java Messaging Ser= vice (JMS) topic or it= could be implemented as + Message Driven Bean (MDB) in order to send a message to the <a4j:push> - makes request to minimal code (not to JSF tree) in order= to check presence of - messages in a queue. If a message exists, a complete request is perf= ormed. The component - doesn't poll registered bean. It registers EventListe= ner, which - receives messages about event presence. See an example below: + component about an event presence. In the presence of th= e event some action + occurs. = + Thus, a work paradigm with the + <a4j:push> + component corresponds to an anisochronous model, but not= to pools as for + <a4j:poll> + component. See the simplest example below: + Example: - + - In the example + + Code for EventListener registration in the = bean is placed below: + + Example: + + + + A page code for this example is placed below. + + + Example: + + + + + + + + + + + + + +... = +]]> + + The example shows how date is updated on a page in compliance wi= th data taken from a + server. In the example "interval" attribute has value "2000". This attribute def= ines an interval - in milliseconds beetween the previous response and the next request.= Default value is set to + in milliseconds between the previous response and the next request. = Default value is set to "1000" milliseconds (1 second). It's possible to set = value equal to "0". In this case connection is permanent. The "timeout" - attribute defines response wating time in milliseconds. = If the response + attribute defines response waiting time in milliseconds.= If a response isn't received during this period a connection is aborted and t= he next request is sent. Default value for "timeout" @@ -81,22 +134,11 @@ and "timeout" attributes gives an opportunity to set short polls of qu= eue state or long - connections or permanent connection generally. - Code for EventListener registration in a be= an is placed below: - - Example: - - + connections, or permanent connection. = - - + Note: The form around the + <a4j:push> + component is required. =