• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Handling Session timeout with ajax
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handling Session timeout with ajax


  • Subject: Re: Handling Session timeout with ajax
  • From: Robert Tupelo-Schneck <email@hidden>
  • Date: Fri, 30 Jan 2009 16:14:51 -0500

On Wed, 28 Jan 2009 09:38:43 -0800, Chuck Hill <chill@global- village.net> wrote:
if (AjaxUtils.isAjaxRequest(aContext.request())) {
	// Create redirect to return to break out of Ajax
	AjaxUtils.redirectTo(errorPage);
	WOResponse redirect = errorPage.context().response();

	// Generate the error page so that it gets into the page cache, don't
do this earlier!
	errorPage.generateResponse();
	return redirect;
}

Very useful!

It doesn't seem to work correctly when I click an AjaxTabbedPanelTab. In that case the tab fills with something that looks like the normal WebObjects session timeout page with a bit of javascript tacked on the end; in fact, if I peek at redirect.contentString(), I get
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>Missing Session Error</title>
...
</html>
document.location.href='/cgi-bin/WebObjects/WOPrefixReg.woa/wo/1.0';


In other instances, when it works correctly, the last line of redirect.contentString() looks more like
<script type="text/javascript">document.location.href='/cgi-bin/ WebObjects/WOPrefixReg.woa/wo/1.0';</script>


Any idea why the <script> etc. is left off in the tab case?

Robert

_______________________________________________
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


  • Follow-Ups:
    • Re: Handling Session timeout with ajax
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: webobjects.mdimension.com going down for a little bit
  • Next by Date: Re: Prefetching?
  • Previous by thread: Re: Handling Session timeout with ajax
  • Next by thread: Re: Handling Session timeout with ajax
  • Index(es):
    • Date
    • Thread