SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 126 | Next

Alexander Kolesnikov

"Tapestry 5: Building Web Applications"


Finally, there is an ActionLink component, disguised as an HTML link, surrounding
the last name of each celebrity in the table:
t:id="detailsLink">
${celebrity.lastName}

ActionLink is basically a link that is associated with an action, or, in other words,
with an event handler. While PageLinks's main aim is to navigate to another page,
the ActionLink's purpose is to run some code in an event handler in response to a
click on the link. As a result of that code, we can navigate to another page, but not
necessarily so.
Chapter 4
[ 99 ]
ActionLink's predecessor in the previous versions of Tapestry, DirectLink, was the
only natural choice for the pattern where we have a number of entities displayed in a
table, and by clicking on a link we want to see the details of one of the items??”a kind
of master-detail pattern. ActionLink should have a t:id attribute. This is how we
are going to associate an event handler with it. Quite often, it also has a t:context
attribute, which provides a parameter (or parameters) to the event handler. In our
case this parameter is the ID of the celebrity displayed in the given table row.


Pages:
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
druga wojna światowa Free English grammar and study guid hotel jelenia góra Russian bride counter strike 1.6