Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Notice that Chooser.tml contains an ActionLink component. When rendered on the page, the ActionLink component creates a component event request URL, with the event type set to "action". In this case the URL might look like http://localhost:8080/chooser.select/3Image Removed

This URL identifies the page that contains the component ("chooser"), the type of event (unless it is "action", the default and most common event type), the id of the component within the page ("select"), plus the additional context value ("3"). Additional context values, if any, are appended to the path.

...

  • Because of the annotation, it identifies method valueChosen() as the method to invoke.
  • When the link is clicked, it converts the context value from a string to an integer and passes it into the method.
Since
since5.3
Starting in release 5.3, Tapestry will validate that the component, if any, identified for the event handler method actually exists in the containing component's template. This helps with typos in annotations (or in the naming conventions identified below).

In the above example, the valueChosen() method will be invoked when the default event, "action", occurs in the select component (and has at least one context value).

...