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

Alexander Kolesnikov

"Tapestry 5: Building Web Applications"

occupation}


In place of this code, add the following line:

Chapter 5
[ 129 ]
Run the application, log in to be able to view the collection, and you should see the
following result:
Quite an impressive result for a single short line of code, isn't it? Not only are our
celebrities now displayed in a neatly formatted table, but also, we can sort the
collection by clicking on the columns' headers. Also note that occupation now has
only the first character capitalized??”much better than the fully capitalized version we
had before.
Here, we see the results of some clever guesses on Tapestry's side. The only required
parameter of the Grid component is source, the same as the required parameter of
the Loop component. Through this parameter, Grid receives a number of objects of
the same class. It takes the first object of this collection and finds out its properties. It
tries to create a column for each property, transforming the property's name for the
column's header (for example, lastName property name gives Last Name column
header) and makes some additional sensible adjustments like changing the case of
the occupation property values in our example.


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