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 165 | Next

Alexander Kolesnikov

"Tapestry 5: Building Web Applications"


All this is quite impressive, but the table, as it is displayed now, has a number
of deficiencies:
All celebrities are displayed on one page, while we wanted to see how
pagination works. This is because the default number of records per page for
Grid component is 25??”more than we have in our collection at the moment.
???
Advanced Components
[ 130 ]
The last name of the celebrities does not provide a link to the Details
page anymore.
It doesn't make sense to show the Id column.
The order of the columns is wrong. It would be more sensible to have the
Last Name in the first column, then First Name, and finally the Date of Birth.
By default, to define the display of the order of columns in the table,
Tapestry will use the order in which getter methods are defined in the
displayed class. In the Celebrity class, the getFirstName method is
the first of the getters and so the First Name column will go first, and
so on.
There are also some other issues we might want to take care of, but let's first deal
with these four.
Tweaking the Grid
First of all let's change the number of records per page. Just add the following
parameter to the component's declaration:

Run the application, and here is what you should see:
??? ??? ???
Chapter 5
[ 131 ]
You can now easily page through the records using the attractive pager control that
appeared at the bottom of the table.


Pages:
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6