RedirectException is a subclass of RequestCycleException. Declare throws RequestCycleException.
----- Original Message ----- From: "Craig Miskell" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, September 16, 2002 7:15 PM Subject: [Tapestry-developer] Listeners and RedirectException > Hi, > I'm using Tapestry 2.1, and am implementing a "Logout" function. > It invalidates the HttpSession by: > > this.getRequestCycle().getRequestContext().getSession().invalidate(); > > (is this "correct"... can't see anything else, but I'm still feeling my > way around) > > and then we want to redirect to an external url (the users "logout" page). > <looks in tutorials/docos> > Cool, throw a RedirectException with the url in question. Perfect. But, > when I do this in a "magical" listener method, I have to declare the > method with "throws RedirectException". As a result, the "magical" > listeners collection doesn't pick up that method. When I try to view the > page, I get an error complaining that listeners.logout can't be found. As > soon as I remove the throws clause (and the actual "throw" statement), it > will work. > > It's not a biggie, because there's obviously other ways around it (like > manually implementing IActionListener). What I'm more interested in is > whether it's by design or not? Is there any reason why the listeners > collection shouldn't include methods that happen to throw > RedirectException (or even PageRedirectException)? > > Oh yeah, and if I'm completely missing the point/doing things in a > convoluted horrible way, please point it out. I'm a WebObjects-geek > converting to Tapestry, so I've probably got some bad notions floating > around in my head :-) > > Craig > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Tapestry-developer mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/tapestry-developer ------------------------------------------------------- Sponsored by: AMD - Your access to the experts on Hammer Technology! Open Source & Linux Developers, register now for the AMD Developer Symposium. Code: EX8664 http://www.developwithamd.com/developerlab _______________________________________________ Tapestry-developer mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/tapestry-developer
