Re: Handling Session timeout with ajax
Re: Handling Session timeout with ajax
- Subject: Re: Handling Session timeout with ajax
- From: Paul Hoadley <email@hidden>
- Date: Sat, 24 Jan 2009 13:45:14 +1030
Hi Chuck,On 20/01/2009, at 7:09 AM, Chuck Hill wrote:
... if (AjaxUtils.isAjaxRequest(aContext.request())) { AjaxUtils.redirectTo(errorPage); return errorPage.context().response(); } return errorPage.generateResponse();
Should this also work in Application.handleException()? I've got this:
public WOResponse handleException(Exception anException, WOContext aContext) { AMErrorPage errorPage = (AMErrorPage) pageWithName(AMErrorPage.class .getName(), aContext); errorPage.setPageType(AMErrorPage.EXCEPTION); if (AjaxUtils.isAjaxRequest(aContext.request())) { AjaxUtils.redirectTo(errorPage); return errorPage.context().response(); } return errorPage.generateResponse(); }
Throwing an exception from an Ajax action bypasses my AMErrorPage, somehow logs me out of the app, and returns my Main page. I can't even see how it's occurring. There's literally nothing in the console beyond a log message from AMErrorPage.setPageType(). Again, this is a slightly different issue than the OP, and I assume your code above was for Application.handleSessionRestorationErrorInContext.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden