I'm having a problem with my authentication redirect when using Ajax to
update page components. I use PageRedirectException on each page to
redirect to a login page if the user is not logged in when the page
validates. This works as expected when hitting the page normally, but if
I am using an AjaxDirectLink after the login has expired, the response
is returned as the HTML of the login page and not "handled" by
AjaxDirectService so that it is wrapped in the xml tags and have the
"window.location.href" javascript redirect added. As the response is not
xml, it breaks on the client side and the page does not redirect.
I have seen a few other people bring up this issue, but I can't find any
evidence of a solution or work around. I would have thought that this
would be a common problem, but maybe I am just overlooking a simple fix.
Any help here would be greatly appreciated!
My pageValidate method is simply:
public void pageValidate(PageEvent event) {
if (!isLoggedIn()) {
Login loginPage = getRedirectPage();
throw new PageRedirectException(loginPage);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]