Hi,
I have a link that redirects to a page where should be a link back to the original page. I tried to use RestartResponseAtInterceptPageException to accomplish this.
OriginalPage:
public OriginalPage() {
...
add(new Link("link") {
public void onClick() {
throw new RestartResponseAtInterceptPageException(RedirectPage.class);
}
});
...
}
RedirectPage:
public RedirectPage() {
...
add(new Link("back") {
public void onClick() {
continueToOriginalDestination();
}
});
...
}
But this does not work, because the url of original destination points to onClick handler, which redirect to RedirectPage again!
I guess I should check this and not redirect if we getting back from RedirectPage. But how can the onClick handler detect this?
/arto
