hej,
I'm just looking form clarification on
RestartResponseAtInterceptPageException and continueToOriginalDestination().

On every page I have a log-in link, and after log in I should be redirected
back to the original destination. I use oauth api that requires that I
redirect user to external url and then user will be redirected back to my
service.
In handler for onClick i have

new RestartResponseAtInterceptPageException(MainPage.class);
throw new RedirectToUrlException(url);

intercept page does not matter as I do not throw the exception I just save
InterceptData in session so next time I call
continueToOriginalDestination() this data will be used.

the only problem is that while saving (from
RestartResponseAtInterceptPageException.InterceptData)

Request request = RequestCycle.get().getRequest();
data.originalUrl = request.getOriginalUrl();

originalUrl point to onClick callback and then app loops.

I could of course save page instance and then redirect to it, but this is
reinventing the mechanism that wicket already provides, isn't it?
I know that RestartResponseAtInterceptPageException is used with accessing
protected resources with IUnauthorizedComponentInstantiationListener and
then url always points to page and not to handler.

thanks for any comment on that

pozdrawiam
Paweł Kamiński

[email protected]
[email protected]
______________________

Reply via email to