Hi, Martin.

"First, sorry for any mistakes, but I am Brazilian and my English is not
very good." :-)

I need your help. I found exactly the same problems you, as follows:

*
// This page will be redirect to a page intercepting
public class Checkout extends WebPage {
      User loggedInUser = session.getLoggedInUser();
                
               if (loggedInUser == null) {
                        redirectToInterceptPage(new Login(params));
                }
}

public class Login extends WebPage {

            // Method should return true and display the Checkout page
                if (!this.continueToOriginalDestination()) {
                        setResponsePage(ShowCatalog.class);
                }
}
*
Results: The method does not return true and throws the exception
ReplaceHandlerException, not redirecting after login to the Checkout page. I
don't know how to deal it. 

How did you solve this problem?


peakmop wrote
> 
> To follow up, and to put this issue at rest, here's the explanation
> (thanks to the wicket authentication examples):
> The ReplaceHandlerException will get thrown if there is an active request
> handler on the stack to stop its execution and start executing the new
> request handler (usually RedirectRequestHandler) if the original request
> was for some bookmarkable page. The exception eventually will get
> intercepted in the request handler code and the new request handler will
> get executed, and the requested page will eventually be rendered. Since
> before WICKET-4269 addressed the return values of
> continueToOriginalDestination(), that method return values were used to
> determine whether a redirect to the default (usually home page) or a
> redirect to the requested page is to take place. I was catching an
> Exception in the login page which also intercepted the
> ReplaceHandlerException which prevented the replacement request handler
> from being successfully executed down the road. I didn't realize this
> until I attached a debugger to the authentication examples.
> Developers can correct me if I'm off in my explanation here.
> 
> -Martin-
> 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Handling-ReplaceHandlerException-on-continueToOriginalDestination-in-wicket-1-5-tp4101981p4649528.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to