Hi Algirdas, you can use the @OnEvent annotation with a value of "activate". For the redirect, you should simply return the class of the page.
Regards Alex On Wed, 2010-02-24 at 11:11 -0800, Algirdas wrote: > Hello, > > Is there any way to do a redirect from any method? > > For example I have EnsureUserLoggedIn() which should redirect to Login page, > but this is called not in onActivate() method. > > I used response.sendRedirect(link), but since upgrage to 5.1.0.5 it throws > NPE > > > > org.apache.tapestry5.internal.services.ResponseCompressionAnalyzerImpl.isCompressable(ResponseCompressionAnalyzerImpl.java:65) > > $ResponseCompressionAnalyzer_126fd51477a.isCompressable($ResponseCompressionAnalyzer_126fd51477a.java) > > org.apache.tapestry5.internal.gzip.BufferedGZipOutputStream.openResponseOutputStream(BufferedGZipOutputStream.java:77) > > org.apache.tapestry5.internal.gzip.BufferedGZipOutputStream.checkForCutover(BufferedGZipOutputStream.java:70) > > org.apache.tapestry5.internal.gzip.BufferedGZipOutputStream.write(BufferedGZipOutputStream.java:116) > > Algirdas -- mobile: +49 (0) 176 6152 9741 phone: +49 (0) 341 2289 188 e-mail: alexanderk...@gmx.net web: www.alexanderkiel.net
signature.asc
Description: This is a digitally signed message part