I use something like this:
public WOResponse handlePageRestorationErrorInContext(WOContext aContext)
{
WOComponent errorPage = pageWithName(pageRestorationErrorPageName(),
aContext);
WOResponse response = null;
if (AjaxUtils.isAjaxRequest(aContext.request()))
{
AjaxUtils.redirectTo(errorPage);
response = errorPage.context().response();
aContext.session().savePage(errorPage);
}
else
{
response = errorPage.generateResponse();
}
response.setStatus(500);
return response;
}
On Nov 22, 2010, at 11:35 AM, Johnny Miller wrote:
> Hi,
>
> I'm sure this is discussed somewhere but I'm unable to find it.
>
> If a session timeouts between ajax requests how do you handle the response?
> I assume it is a combination of WOApplication's
> handleSessionRestorationErrorInContext and AjaxUtil.isAjaxRequest methods.
>
> Do you just return a javascript method in the response that redirects to a
> direct action? I can also see from wocontext that you may be able to
> triangulate which page the request originated from.
>
> Anyway, any advice would be greatly appreciated!
>
> Johnny Miller
> Kahalawai Media Corp
> http://www.kahalawai.com
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
>
> This email sent to [email protected]
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their overall
knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
