RE: setResponsePage in the beggining of a constructor does not work

2010-02-05 Thread Chris Colman
Cool, thanks! That works fine. Just write this in WebApplication#init: getApplicationSettings().setPageExpiredErrorPage(PageExpiredError.class); This should solve your problem. Regards, Peter 2010-02-05 00:59 keltezéssel, Chris Colman írta: Could I use RestartResponseException to

RE: setResponsePage in the beggining of a constructor does not work

2010-02-05 Thread Chris Colman
I tried that approach of looking around the tree but I must have missed that Exception somehow. Looks like what I was after. In the end the ExpiredPage solution worked out to be a good approach because I got to create an ExpiredPage that's styled to the style of the rest of the site. In Wicket

setResponsePage in the beggining of a constructor does not work

2010-02-04 Thread Martin Asenov
Hello guys! I've got three pages, where I do certain check in the beginning and if the criteria is not met, I redirect to home page. I make it that way: public MyPageClass { if (something) { system.out.println(mypageclass - we're in);

Re: setResponsePage in the beggining of a constructor does not work

2010-02-04 Thread Major Péter
Hi, the setresponsepage only marks, that the pagetarget is something else on the end of the cycle, but it isn't stopping the execution of the current page. If you want that, then use: throw new RestartResponseException(getApplication().getHomePage()); Regards, Peter 2010-02-04 14:16

RE: setResponsePage in the beggining of a constructor does not work

2010-02-04 Thread Martin Asenov
Thanks friend! Works great! You saved me a lot of time! Best regards, Martin -Original Message- From: Major Péter [mailto:majorpe...@sch.bme.hu] Sent: Thursday, February 04, 2010 3:21 PM To: users@wicket.apache.org Subject: Re: setResponsePage in the beggining of a constructor does not

RE: setResponsePage in the beggining of a constructor does not work

2010-02-04 Thread Chris Colman
Could I use RestartResponseException to redirect to a URL instead of a bookmarkable page? My problem is that all of my pages require a parameter (even the home page but that's fine because the Tomcat container server.xml configures the appropriate redirection for me - users never have to enter

Re: setResponsePage in the beggining of a constructor does not work

2010-02-04 Thread Major Péter
Just write this in WebApplication#init: getApplicationSettings().setPageExpiredErrorPage(PageExpiredError.class); This should solve your problem. Regards, Peter 2010-02-05 00:59 keltezéssel, Chris Colman írta: Could I use RestartResponseException to redirect to a URL instead of a bookmarkable

Re: setResponsePage in the beggining of a constructor does not work

2010-02-04 Thread Steve Swinsburg
They don't need to be bookmarkable. You can call specific constructors of a class if you want: throw new RestartResponseException(new MyClass(something)); cheers, Steve On 05/02/2010, at 10:59 AM, Chris Colman wrote: Could I use RestartResponseException to redirect to a URL instead of a

Re: setResponsePage in the beggining of a constructor does not work

2010-02-04 Thread Erik van Oosten
In Wicket it usually helps to look at the classes that are near in the class hierarchy. In this case RestartResponseException extends from AbstractRestartResponseException. Another subclass of AbstractRestartResponseException is RedirectToUrlException, which does exactly what you ask.