When throwing the Restart... exception,
continueToOriginalDestination() yields false.

On Thu, Mar 20, 2008 at 2:17 PM, Hoover, William <[EMAIL PROTECTED]> wrote:
> Try the following:
>
>  if (!continueToOriginalDestination()) {
>                 setResponsePage(getApplication().getHomePage());
>
>
> }
>
>  -----Original Message-----
>  From: Jörn Zaefferer [mailto:[EMAIL PROTECTED]
>  Sent: Thursday, March 20, 2008 9:13 AM
>  To: users@wicket.apache.org
>  Subject: Re: Mounting and intercept pages
>
>
>  Thanks Martijn. I gave that a try:
>
>  add(new Link("register") {
>         @Override public void onClick() {
>                 throw new 
> RestartResponseAtInterceptPageException(Register.class);
>         }
>         @Override
>         public boolean isVisible() {
>                 return !UserSession.get().isSignedIn();
>         }
>         @Override protected CharSequence getURL() {
>                 return urlFor(getPageMap(), Register.class, 
> getPageParameters());
>         }
>  });
>
>  Submitting the register form (page Register) doesn't redirect me back
>  to the page where was I coming from, instead only displays the
>  register form again (with a wicket:interface url).
>
>  What am I missing?
>
>  Jörn
>
>
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to