It's easy if you do it from activate event handler method (onActivate()), just return the page name or page instance to redirect to. Once you progress as far as the SetupRender phase, you are committed to rendering a response.
On 5/27/07, Hilco Wijbenga <[EMAIL PROTECTED]> wrote:
On 5/27/07, Jesse Kuhnert <[EMAIL PROTECTED]> wrote: > void setup() > { > throw new PageRedirectException("YourPageName"); > } So what about T5? I found "onActivate()" in the mailinglist and that works ... partially. Requesting www.example.com/app/start redirects as expected [onActivate() is in Start.java] but requesting www.example.com/app just yields a blank page? I can get it to work using @Inject private Response response; public void onActivate() throws IOException { response.sendRedirect("PageName"); } but that seems a bit ugly. What is the proper Tapestry (5) way to redirect? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com