Hi Russell, I do this in the SetupRender phase.
@Inject private org.apache.tapestry.services.Response _response; void setupRender () throws Exception { if (/* condition satisfied */) _response.sendRedirect( "http://example.com" ); } Cheers, Bill On Fri, May 30, 2008 at 3:23 AM, Russell Brown <[EMAIL PROTECTED]> wrote: > Hi All, > > New to Tapestry 5. I have read the Building Web Apps Tapestry 5 book by > Alexander Kolesnikov and am working through the documentation and Wiki > too and I have a functional little web app at the moment that took me > all of a few hours to build and test so I am very pleased with the > productivity. > > > > I haven't found how to redirect to an external url though. I think my > mind is stuck in Strruts MVC groove after all these years. So I have a > Page class and what I want the page to do is check for the presence of > an @ApplicationState property and redirect to an external url. In struts > I'd have the logic in the execute method of an Action. In Tapestry 5 do > I put this code in the onBeforeRender method? And how exactly do I do a > redirect to an external url please? > > > > I know I am thinking in the action-forward-to-view way and that the > relationship between a page class and a page template is not exactly > analogous...I think this is conceptually where I am stuck. Not all web > apps are about pages so what metaphor is there for requests that aren't > page based? My practical problem above stems from current failure to > grok the pattern Tapestry 5 implements. > > > > Many thanks in advance if you can help (with either my practical or > conceptual problem). > > > > Russell > > > > Communications on or through ioko's computer systems may be monitored or > recorded to secure effective system operation and for other lawful purposes. > > Unless otherwise agreed expressly in writing, this communication is to be > treated as confidential and the information in it may not be used or > disclosed except for the purpose for which it has been sent. If you have > reason to believe that you are not the intended recipient of this > communication, please contact the sender immediately. No employee is > authorised to conclude any binding agreement on behalf of ioko with another > party by e-mail without prior express written confirmation. > > ioko365 Ltd. VAT reg 656 2443 31. Reg no 3048367. All rights reserved. > -- Those who can make you believe absurdities can make you commit atrocities. Voltaire