When I try to return a String or a page in the activate handler, a RuntimeException is thrown saying: 'This type of event does not support return values from event handler methods'.
so I think it's a bug. I am using tap 5.0.1 Howard Lewis Ship wrote: > > I think the activate event handler should be able to return a > navigational result, such as a page instance or page name. If it does > not currently accept that, it's a bug! > > On 2/20/07, bueggers <[EMAIL PROTECTED]> wrote: >> >> I have a detail page that takes an id parameter from the url according to >> the >> activate/passivate events. >> This is very fine since the details can be linked from an overview list >> and >> the detail-urls are clean and nicely bookmarkable as well. >> >> But a problem occurs when there comes an id to the onActivate method that >> has no details on the database. >> In this case I would like to show an error page saying that the given id >> doesn't exist. >> In Tap 4 this kind of stuff could easily be accomplished with >> ExternalLink >> and RedirectException. >> >> But where to do the redirection to an error page in Tap 5? >> The onActivate method detects the error but how to display other page >> then? >> >> other approach I tried is >> -just store the id in a page-property in the onActivate method >> -make the details database lookup in the following SetupRender lifecycle >> method. >> >> That works fine as long as details are found. But same problem: Unable to >> redirect to other page in the setupRender method. >> >> In the documentation Howard mentions that the life cycle methods can also >> return a componentl. So I gave my setupRender method the return type >> 'Object' injected the error page in my detail page and returned it in >> case >> of no details. But NullPointerException throws up. I am unable to display >> other components dynamically from a lifecycle method. >> >> any ideas? >> >> >> -- >> View this message in context: >> http://www.nabble.com/Tap-5-redirect-after-onActivate-tf3260344.html#a9061180 >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> 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 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Tap-5-redirect-after-onActivate-tf3260344.html#a9075984 Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]