Prev | Current Page 241 | Next

Alexander Kolesnikov

"Tapestry 5: Building Web Applications"

The
following example shows the changed version of the AddCelebrity page. Please
transform all the other pages in a similar way:
Chapter 8
[ 199 ]

Adding New Celebrity


t:object="celebrity"
t:submitLabel="Save" t:model="model">


t:value="celebrity.biography" cols="30" rows="5"/>



We had to declare Tapestry name space inside of the opening tag of the border
component; otherwise it would not be clear to any XML parser what exactly the
t: prefix means.
You can now see that the opening and closing tags of the Border component are
surrounding the content of the page. This content will replace the element
that we placed inside of the Border template when the page is rendered.
The final step is to remove any code that is related to common functionality from
page classes, anything that serves for providing the stylesheet or switching the
locale. We also need to remove the locale switcher from the Start page.
After all this is done, run the application, and you should immediately see that all its
pages have a certain new style and a locale switcher at the top of them.


Pages:
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253
Wczasy nad morzem Gabi meble Warszawa kasyno Biuro księgowe Lublin noclegi zakopane