Re: You've backtracked to far...
Re: You've backtracked to far...
- Subject: Re: You've backtracked to far...
- From: Benjamin Miller <email@hidden>
- Date: Thu, 9 Dec 2004 08:44:55 +0000
Are your users making lots of requests with JavaScript and not getting a new contextID for each request? Maybe they are returning to the original page (with an old context) and trying to use that.
Having spent the last couple of days trying to get JS and sessions to play nicely together ( and seeing lots of backtracking errors), I finally concluded that trying to get an updated context ID into JS is quite tricky. If the JS is in the page then using a WOAction is straight forward. If the JS is not in the main page I fixed all my problems by using direct actions.
Get the JS to send the Session ID as an argument named "wosid", either as a hidden input or appended to the URL, and in your DA get the session back again and do the stuff you want to:
WOSession session = existingSession();
session.defaultEditingContext().saveChanges();
Benjamin
On 8 Dec 2004, at 23:06, email@hidden wrote:
This is happening occasionally to my customers.. what cause it and what
can I do to fix it?
I set this in my Application class:
setPageRefreshOnBacktrackEnabled(true);
They swear they are not hitting the back button either!
Benjamin Miller, Digital Developer
Watershed Media Centre
1 Canon's Road, Harbourside, Bristol, UK. BS1 5TX
t: +44 (0)117 927 6444, f: +44(0)117 921 3958
http://www.watershed.co.uk
iChat/AIM: email@hidden
_______________________________________________
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