• 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: AJAX and You backtracked too far error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AJAX and You backtracked too far error


  • Subject: Re: AJAX and You backtracked too far error
  • From: Ricardo Parada <email@hidden>
  • Date: Tue, 15 Nov 2005 17:59:21 -0600

Thanks miguel!

It seems a lot of developers are doing this type of stuff. I got three really good responses in a couple of minutes.

:-)


On Nov 15, 2005, at 5:44 PM, Miguel Arroz wrote:

Hi!

This is part of the really cool JSON-RPC wrapper component made by Jean-François Veillette. Just add something like the following code to the session:

/** If we know the project is using the 'ajax-component' handler, we should look in the context.request.userInfo dictionary to look for the 'ajax' key. if the 'ajax' key is there, this indicate an 'ajax' request and we do not want it to have any impact on the page cache. This method won't call 'super' if the 'ajax' key is present. */
public void savePage(WOComponent page) {
NSDictionary ui = context().request().userInfo();
if(ui == null || ui.objectForKey (framework.JSProxyRPC.AJAX_REQUEST_KEY) == null) {
super.savePage(page);
}
}


Of course, you must add the "ajax" key on your request, to identify it as an AJAX request.

  Yours

Miguel Arroz

On 2005/11/15, at 23:36, 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:
40guiamac.com


This email sent to email@hidden


      "I felt like putting a bullet between
       the eyes of every Panda that wouldn't
       scr*w to save its species."       -- Fight Club

Miguel Arroz
http://www.ipragma.com




_______________________________________________ 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
References: 
 >AJAX and You backtracked too far error (From: Ricardo Parada <email@hidden>)

  • Prev by Date: Re: AJAX and You backtracked too far error
  • Next by Date: Re: WebObjects 5.3.1 Redirect bug?
  • Previous by thread: Re: AJAX and You backtracked too far error
  • Next by thread: Sun Application server JDBC
  • Index(es):
    • Date
    • Thread