Re: Multiple CCAjaxLongResponsePages For Single Task
Re: Multiple CCAjaxLongResponsePages For Single Task
- Subject: Re: Multiple CCAjaxLongResponsePages For Single Task
- From: Kieran Kelleher <email@hidden>
- Date: Fri, 23 Mar 2012 09:38:35 -0400
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