Daniel, I just setup a system where I have an ApplicationScoped bean hold a String authenticationDeniedMessage (could obviously be any error message). On my GenericPage which all my pages extend, I check on the @CleanupRender if this String != null and if so, redirect to my AuthetnicationDenied page. This page renders the message in clears it on @CleanupRender so any subsequent request will work again. This setup allows me to deny access to a page at any point of my page lifecycle without Declerative or Runtime Exceptions.
Cheers, Joost -----Original Message----- From: Daniel Jue [mailto:[EMAIL PROTECTED] Sent: Thursday, August 02, 2007 2:56 AM To: Tapestry users Subject: T5 Strategy for redirecting due to any error Hi, this is more a question of technique than an actual problem. Some use cases: Lets say I have code that throws a NPE. I'd get a Tapestry error page that spills it's guts. It must use some technique for redirecting to another page at any point (might be too deep in the framework to harness that power) Lets say I have another page that requires a user session (ASO) -- the OnActivate method would do the checking and redirect to a page from there. Anyone can do this from OnActivate--so long as you know everything in the OnActivate() method, so it's not really interesting. Now lets say I have a page or component that checks a value that we could label as invalid, or we have a select component that can't be filled because a DB is down. Is there a way to redirect to another page at any point in the render process of a component or page? I think this would kind of fall along the lines of people who questioned how to replace the Tapestry error page with something more appropriate for the end user. Except that I'd want to be able to explicitly call/forward to an arbitrary page when my code comes across something abnormal. Does anyone have ideas or strategies about this? Daniel Jue --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]