[SOLVED] Re: You've backtracked to far...
[SOLVED] Re: You've backtracked to far...
- Subject: [SOLVED] Re: You've backtracked to far...
- From: James Cicenia <email@hidden>
- Date: Thu, 9 Dec 2004 08:11:05 -0600
Thanks everyone -
DirectAction cures the problem! Though this will require some additional work to identify all my popups it does work without increasing pageCacheSize, memory etc.
In my JavaScript that closes my window I now use:
<x-tad-bigger><SCRIPT LANGUAGE=Javascript>window.opener.location.href = '<webobject name=String1></webobject>';self.close();</SCRIPT>
where String1 is bound to a method:
public String refreshIt(){
return context().directActionURLForActionNamed("project",null);
}</x-tad-bigger>
This worked great, especially since my current project was already in Session.
Thanks again everyone for hints, critiques and the solution.
- James Cicenia
On Dec 9, 2004, at 2:44 AM, Benjamin Miller wrote:
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
_______________________________________________
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