• 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: Multiple CCAjaxLongResponsePages For Single Task
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple CCAjaxLongResponsePages For Single Task


  • Subject: Re: Multiple CCAjaxLongResponsePages For Single Task
  • From: Ted Archibald <email@hidden>
  • Date: Fri, 23 Mar 2012 17:29:28 -0600

That would work too.  What I did instead was add a setTask method that takes a task and the task class.  Then I look up if that that task class exists in the taskInfos, and if so it switches the future task to the task from taskInfo.  Then I pull the elapsed time from the task and add it to the current elapsed time.  It works quite nicely.  The only "bug" i have is that if one of the CCAjaxLongResponsePage's cancels the task the other CCAjaxLongResponsePages just think the task is completed instead of canceled (minor inconvenience).

On Fri, Mar 23, 2012 at 7:38 AM, Kieran Kelleher <email@hidden> wrote:
Just OTOH, you could try the following:

(1) Add a setFuture(...) method to CCAjaxLongResponsePage to set the Future directly.

(2) then before returning the page, get a reference to your running task, wrap it in a ERXFutureTask and setFuture(...) instead of setTask(...)

HTH, Kieran


On Mar 23, 2012, at 1:56 AM, Ted Archibald wrote:

> Is there any way to use CCAjaxLongResponsePage on a task that's already running?
>
> Essentially I want to run a task but only a single iteration of that task, and if the task is already running I want to display a CCAjaxLongResponsePage for the progress.
>
> So far I have a simple loop that looks at the taskInfos in ERXTaskThread.taskInfos() then I create a new CCAjaxLongResponsePage and set the task to the running task.
>
> My problem is that only the ORIGINAL created task maintains the CCAjaxLongResponsePage properly.  Any new CCAjaxLongResponsePage will simply display the current status for a moment or two then will redirect to the nextPage component.  If I leave the nextPage component null then it will simply redirect to the CCAjaxLongResponsePage and update the status, but this isn't the desired result (since it's not updating via ajax, and will never reach the nextPage component).
> _______________________________________________
> 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

References: 
 >Multiple CCAjaxLongResponsePages For Single Task (From: Ted Archibald <email@hidden>)
 >Re: Multiple CCAjaxLongResponsePages For Single Task (From: Kieran Kelleher <email@hidden>)

  • Prev by Date: Re: JDBC Connection Debugging information
  • Next by Date: Re: JDBC Connection Debugging information
  • Previous by thread: Re: Multiple CCAjaxLongResponsePages For Single Task
  • Next by thread: NSMutableDictionary OR NSDictionary
  • Index(es):
    • Date
    • Thread