There are actually a few different options of what you can return from an event handler:
Nothing: This is when the method is void or when it returns a null value. In this case the current page will render the request. That is, it will be redisplayed.
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.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...