If you would rather have the pager at the top,
add another parameter to the Grid declaration:
pagerPosition="top"/>
You can even have two pagers, at the top and at the bottom, by specifying
pagerPosition="both", or no pagers at all (pagerPosition="none"). In the latter
case however, you will have to provide some custom way of paging through records.
The next enhancement will be a link surrounding the celebrity's last name and
linking to the Details page. We'll be adding an ActionLink and will need to know
which Celebrity to link to, so we have the Grid store using the row parameter. This
is how the Grid declaration will look:
row="celebrity"/>
As for the page class, we already have the celebrity property in it. It should have
been left from our experiments with the Loop component. It will also be used in
exactly the same way as with Loop, while iterating through the objects provided by
its source parameter, Grid will assign the object that is used to display the current
row to the celebrity property.
The next thing to do is to tell Tapestry that when it comes to the contents of the Last
Name column, we do not want Grid to display it in a default way.
Pages:
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178