Prev | Current Page 79 | Next

Alexander Kolesnikov

"Tapestry 5: Building Web Applications"


String: Tapestry will expect it to be some application page's logical name, like
another (the name is case-insensitive). You will find more on logical names
later in this chapter.
Class: This should be a page class, like Another.class. Returning a class
is a preferable approach, as compared to returning a logical name of the
page as a string. This is because the logical name can change if application is
restructured in the future, while its class will remain the same.
???
???
???
Chapter 3
[ 63 ]
Page: An instance of a page can be returned exactly like we did previously.
Tapestry will make sure that page is displayed.
Link: An implementation of a Link interface will be converted into an
appropriate URL and the client will be redirected to that URL.
Stream: A stream or more specifically, StreamResponse object. This option
allows us to send to the user a binary stream??”say, a generated PDF or an
Excel document.
Any other object returned from an event handler will cause an error.
Run the application, submit some message, and everything will seem to work
properly. The messages on the console will be as expected, and the Another page
will be shown, but it will not display the message that we have just passed to it:
Why is that? To understand what has happened in this case, we need to discuss one
subtle but important feature of Tapestry.


Pages:
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
katalog stron szambo betonowe wierszyki dieta light katalog stron