Re: AJAX and You backtracked too far error
Re: AJAX and You backtracked too far error
- Subject: Re: AJAX and You backtracked too far error
- From: Greg Hulands <email@hidden>
- Date: Wed, 16 Nov 2005 09:47:39 +1000
In you super component have a method like
public void setIsRPCMethod() {
NSDictionary oldUI = context().request().userInfo();
NSMutableDictionary ui;
if (oldUI != null)
ui = new NSMutableDictionary(oldUI);
else
ui = new NSMutableDictionary();
ui.setObjectForKey(new Boolean(true), Session.RPC_COMPONENT_ACTION);
}
and then in Session have
public void savePage(WOComponent page) {
WORequest req = context().request();
if (req != null) {
NSDictionary ui = req.userInfo();
if(ui == null || ui.objectForKey(Session.RPC_COMPONENT_ACTION) ==
null) {
super.savePage(page);
}
}
}
Then in any component action that is been called through RPC (AJAX)
just call the method setIsRPCMethod and you should get this problem.
HTH,
Greg
On 16/11/2005, at 9:36 AM, Ricardo Parada wrote:
I have a little app that displays a page where the user clicks a
hyperlink that invokes a component action that starts a thread of a
long running process.
The page then displays again showing that the task in in-progress.
I then use javascript's XMLHttpRequest to get status information
periodically and update a section of the HTML on the page to show
the user the elapsed time, what it's doing, status and stuff like
that.
The javascript code checks the status of the task until it
completes. When the status is complete I submit the form on the
page to cause it to redisplay. However, when I do that I get this
error:
You backtracked too far.
The application backtracking limit of 30 has been exceeded.
Any ideas how to avoid this error?
The direct action that generates the page with the status
information that is sent to the browser is as follows:
public WOActionResults checkStatusAction() {
return pageWithName("TaskStatus");
}
TaskStatus component simply returns the XML containing the status
information for the running task.
The checkStatusAction is called by the javascript on the browser
using XMLHttpRequest.
I read the WebObjects documentation on page caching but I still
can't figure out how to avoid this error.
If anyone has any ideas please shoot me an email.
Thanks,
Ricardo Parada
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40framedphotographics.com
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