You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2010/03/03 02:56:43 UTC

svn commit: r918305 - in /tapestry/tapestry5/trunk/src/site: apt/guide/event.apt apt/index.apt site.xml

Author: hlship
Date: Wed Mar  3 01:56:43 2010
New Revision: 918305

URL: http://svn.apache.org/viewvc?rev=918305&view=rev
Log:
TAP5-156: Update documentation

Modified:
    tapestry/tapestry5/trunk/src/site/apt/guide/event.apt
    tapestry/tapestry5/trunk/src/site/apt/index.apt
    tapestry/tapestry5/trunk/src/site/site.xml

Modified: tapestry/tapestry5/trunk/src/site/apt/guide/event.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/src/site/apt/guide/event.apt?rev=918305&r1=918304&r2=918305&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/src/site/apt/guide/event.apt (original)
+++ tapestry/tapestry5/trunk/src/site/apt/guide/event.apt Wed Mar  3 01:56:43 2010
@@ -25,7 +25,7 @@
   whether it was succesful or not.
   
   In Tapestry 4, you would configure a parameter of a component with the name of a method to invoke
-  when a certain event occured, usually a request from the client.
+  when a certain event occurred, usually a request from the client.
   
   This has some limitations, including the fact that only a single method could be invoked, and that
   it tied together a component and a method based on a method name, which required careful coordination
@@ -52,7 +52,7 @@
 </p>
 +---+
 
-  The ActionLink component creates an action URL.
+  The ActionLink component creates an component event request URL, which the event type set to "action".
   
   The URL identifies the page that contains the component ("chooser"), the type of event
   (unless it is "action", the default and most common event type),
@@ -175,6 +175,26 @@
   and server-side objects.  The {{{../apidocs/org/apache/tapestry5/services/ValueEncoderSource.html}ValueEncoderSource}} service
   provides the necessary value encoders.
 
+@QueryParameter Annotation
+
+  As an alternative to <positional> parameters in the URL, it is also possible to extract query parameter values from the URL
+  . The {{{../apidocs/org/apache/tapestry5/annotations/QueryParameter.html}QueryParameter}} annotation may be placed on an
+  event handler method parameter. The annotation gives the name of the query parameter to extract; the value will be coerced
+  to the type of the parameter. 
+  
+----
+  void onClientUpdate(@QueryParameter("row") int row)
+  {
+    ...
+  }  
+----
+  
+  You are free to mix-and-match positional context parameters with named query parameters.
+  
+  This is very useful when building an Ajax-oriented component. The URL constructed by Tapestry can, on the client side, have
+  query parameters attached to it. On the server-side, those parameters are extracted and converted automatically into 
+  event handler method parameters.  This is preferable to trying to "edit" the Tapestry-constructed URL on the client side.
+
 * Method Matching
 
   An event handler method will only be invoked

Modified: tapestry/tapestry5/trunk/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/src/site/apt/index.apt?rev=918305&r1=918304&r2=918305&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/src/site/apt/index.apt (original)
+++ tapestry/tapestry5/trunk/src/site/apt/index.apt Wed Mar  3 01:56:43 2010
@@ -34,6 +34,8 @@
 
 New And Of Note
 
+  * New {{{apidocs/org/apache/tapestry5/annotations/QueryParameter.html}QueryParameter}} annotation for parameters to event handler methods.
+
   * Submit components can now be used to cancel a form (bypassing client-side validation).
 
   * Tapestry no longer uses a StAX parser to parse templates (it uses a standard SAX parser), meaning fewer dependencies and
@@ -42,9 +44,9 @@
   * A {{{guide/testing.html}guide to integration testing}} is now available.
   
   * The {{{guide/persist.html}@SessionAttribute}} annotation can be used on component fields to
-    read write HttpSession attributes.
+    read and update HttpSession attributes.
   
-  * The {{{tapestry-beanvalidator}JSR-303 Integration Library}} is now available.
+  * The {{{tapestry-beanvalidator}JSR-303 Bean Validation Integration Library}} is now available.
 
   []
   

Modified: tapestry/tapestry5/trunk/src/site/site.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/src/site/site.xml?rev=918305&r1=918304&r2=918305&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/src/site/site.xml (original)
+++ tapestry/tapestry5/trunk/src/site/site.xml Wed Mar  3 01:56:43 2010
@@ -52,7 +52,7 @@
         </menu>
 
         <menu name="Upgrade Notes">
-            <item name="From Tapestry 5.0" href="upgrade.html"/>
+            <item name="From Tapestry 5.1" href="upgrade.html"/>
             <item name="From Tapestry 4" href="upgrade4.html"/>
             <item name="Upgrade Notes (5.0)" href="upgrade5.0.html"/>
             <item name="Release Notes (5.0)" href="release-notes-5.0.html"/>