On Nov 1, 2011, at 7:29 PM, Thiago H. de Paula Figueiredo wrote: > On Tue, 01 Nov 2011 19:37:06 -0200, Tony Nelson <tnel...@starpoint.com> wrote: > >> void setupRender() { >> try { >> >> response.sendRedirect(linkSource.createPageRenderLinkWithContext(ViewUser.class, >> userId)); >> } catch (IOException ioe) { >> // shrug? >> } >> >> } > > Why don't you do the redirection the Tapestry way by returning a ViewUser > instance on onActivate() instead of using Response.sendRedirect()?
The code below seems to work, and if it's the accepted way, that's great. I'll just file this away in my Tapestry5 toolkit. Thanks for setting me straight. Tony package com.starpoint.instihire.pages.view; import com.starpoint.instihire.pages.user.ViewUser; import org.apache.tapestry5.annotations.InjectPage; import org.apache.tapestry5.annotations.PageActivationContext; /** */ public class User { @PageActivationContext private com.starpoint.instihire.domain.user.User user; @InjectPage private ViewUser viewUser; ViewUser onActivate() { viewUser.setUser(user); return viewUser; } } --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org