Just be aware that there are pluses and minuses to doing it in onActivate(). On the plus side, onActivate() is an event handler, so it can control what’s displayed next by its return type. The return type could even be new HttpError(404, "Page not found");
http://jumpstart.doublenegative.com.au/jumpstart7/examples/navigation/returntypes1 <http://jumpstart.doublenegative.com.au/jumpstart7/examples/navigation/returntypes1> On the minus side, it gets called more than you might expect: http://jumpstart.doublenegative.com.au/jumpstart7/examples/navigation/onactivateandonpassivate/3 <http://jumpstart.doublenegative.com.au/jumpstart7/examples/navigation/onactivateandonpassivate/3> Geoff > On 4 Aug 2015, at 9:51 pm, Thiago H de Paula Figueiredo <thiag...@gmail.com> > wrote: > > On Tue, 04 Aug 2015 06:15:08 -0300, Poggenpohl, Daniel > <daniel.poggenp...@isst.fraunhofer.de> wrote: > >> Hello everyone, >> >> as the subject describes, we are trying to decide when to redirect the user >> to the error page. >> >> Tapestry reads the context from the url. As it may happen, a (malicious or >> not) user can decide to try out IDs with a URL. When in the page request >> process should I look in the database, check if the object exists, and >> redirect to an error page if necessary? > > onActivate() and return a non-null (and non-"this") value to tell Tapestry to > do a redirection. See also http://tapestry.apache.org/page-navigation.html. > > -- > Thiago H. de Paula Figueiredo > Tapestry, Java and Hibernate consultant and developer > http://machina.com.br > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org >