Re: Private Homepage Redirection

2008-05-07 Thread Johan Compagner
add this to the api... Because this is the second question about this in a very short time.. johna On Wed, May 7, 2008 at 7:47 AM, Martijn Dashorst [EMAIL PROTECTED] wrote: Perhaps this one helps? public class RedirectToExternalException extends AbstractRestartResponseException {

Re: Private Homepage Redirection

2008-05-07 Thread Alex Jacoby
+1 I did something similar but not nearly so elegant. This would have been nice to have. On May 7, 2008, at 3:22 AM, Johan Compagner wrote: add this to the api... Because this is the second question about this in a very short time.. johna On Wed, May 7, 2008 at 7:47 AM, Martijn

Re: Private Homepage Redirection

2008-05-07 Thread TH Lim
+1 It's a handy class and should be put in the API. Alex Jacoby-2 wrote: +1 I did something similar but not nearly so elegant. This would have been nice to have. On May 7, 2008, at 3:22 AM, Johan Compagner wrote: add this to the api... Because this is the second question about

Re: Private Homepage Redirection

2008-05-06 Thread Maurice Marrink
No, The homepage class will be (at least partially) constructed. Because it is the Component constructor that triggers the call to the listeners. Maurice On Tue, May 6, 2008 at 11:37 AM, TH Lim [EMAIL PROTECTED] wrote: Hi, I have setup a private homepage in

Re: Private Homepage Redirection

2008-05-06 Thread Johan Compagner
But if the right abort/restart exception is thrown then it should work without a complete page being created. johan On Tue, May 6, 2008 at 12:05 PM, Maurice Marrink [EMAIL PROTECTED] wrote: No, The homepage class will be (at least partially) constructed. Because it is the Component

Re: Private Homepage Redirection

2008-05-06 Thread TH Lim
I tried both AbortException and RestartResponseException. They didn't work. AbortException basically causes Wicket to show a blank page instead of redirecting to the external site while RestartResponseException caused stack overflow error. The exceptions were thrown in

Re: Private Homepage Redirection

2008-05-06 Thread Eelco Hillenius
I tried both AbortException and RestartResponseException. They didn't work. AbortException basically causes Wicket to show a blank page instead of redirecting to the external site while RestartResponseException caused stack overflow error. The exceptions were thrown in

Re: Private Homepage Redirection

2008-05-06 Thread TH Lim
RestartResponseException worked but it doesn't accept external URL. As a result, I have to put the redirection in the dummy Page's HTML header. Someone in the forum mentioned using WebApplication.getHomePage() to get around but that too requires you to put up a dummy Page to redirect to the

Re: Private Homepage Redirection

2008-05-06 Thread Martijn Dashorst
Perhaps this one helps? public class RedirectToExternalException extends AbstractRestartResponseException { private static final long serialVersionUID = 1L; public RedirectToExternalException(String url) { RequestCycle rc = RequestCycle.get();