Re: Redirecting to page on load

2010-11-11 Thread Everton Agner
A tip... I don't know if the code for your checking is heavyweight, but sometimes it's recommended to check in the onActivate() if the request is a XRH or not... because component events triggers it too. You can do so by @Inject'ing Request (org.apache.tapestry5.services) and calling isXHR() method

Re: Redirecting to page on load

2010-11-08 Thread Juan E. Maya
Yes :) I am aware of it :) I thought he wanted to do it outside a page :) Thanks! :) On Mon, Nov 8, 2010 at 1:32 PM, Thiago H. de Paula Figueiredo wrote: > On Mon, 08 Nov 2010 09:57:47 -0200, Juan E. Maya > wrote: > >> Hi Hugo, > > Hi, Juan! > >> what u could do is to create the Link to the page

Re: Redirecting to page on load

2010-11-08 Thread Thiago H. de Paula Figueiredo
On Mon, 08 Nov 2010 09:57:47 -0200, Juan E. Maya wrote: Hi Hugo, Hi, Juan! what u could do is to create the Link to the page u want to send redirect and then use the response. It would be something like: Link redirectTo = pageRenderLinkSource.createPageRenderLinkWithContext(pageClass, con

Re: Redirecting to page on load

2010-11-08 Thread Juan E. Maya
Hi Hugo, what u could do is to create the Link to the page u want to send redirect and then use the response. It would be something like: Link redirectTo = pageRenderLinkSource.createPageRenderLinkWithContext(pageClass, context); response.sendRedirect(link); I hope it helps! :) On Mon, Nov 8, 20

Re: Redirecting to page on load

2010-11-08 Thread Hugo Palma
{ > return "MyPageName"; > } else { > return null; // keeps you on this page > } > > } > > onActivate() is called before any rendering. > > > > -Original Message- > From: Hugo Palma > Reply-to: "Tapestry users" >

Re: Redirecting to page on load

2010-11-08 Thread Richard Hill
is called before any rendering. -Original Message- From: Hugo Palma Reply-to: "Tapestry users" To: Tapestry users Subject: Redirecting to page on load Date: Mon, 8 Nov 2010 11:43:11 + I would like for a given page to force a redirect to a different page before it&#

Redirecting to page on load

2010-11-08 Thread Hugo Palma
I would like for a given page to force a redirect to a different page before it's rendered if a given condition is met. I could use a simple Response.sendRedirect but that would mean i would have to provide the page name in string format. I would like to avoid having to do this because it would mak