[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [orion-dev] Handling long running validation
|
Hi Chris,
All service calls are under the covers asynch and return a then-able promise unless you are directly using the service object. So, yes just return a deferred and the rest is handled for you.
Also... if you're returning a deferred in a service implementation but are otherwise not using Dojo I would suggest using "orion/Deferred" as it has no dependencies and should load faster than dojo especially when used in a plugin.
For an example see -- bundles/org.eclipse.orion.client.core/web/plugins/filePlugin/fileImpl.js
"Chris Whitty" ---07/10/2012 11:10:23 AM---Hi all,
|
"Chris Whitty" <chris.whitty@xxxxxxxxxxxxxx> |
|
"Orion developer discussions" <orion-dev@xxxxxxxxxxx> |
|
07/10/2012 11:10 AM |
|
[orion-dev] Handling long running validation |
|
orion-dev-bounces@xxxxxxxxxxx |
Hi all,
Apologies if I am missing something obvious here. I have a validator and outliner that make relatively long running xhr requests to a server. I would like this to happen asynchronously but I can't work out how to do this as when the service I registered is called, it seems to be expected to return synchronously. Is there a way to either trigger the rest of the validation myself when the request returns or to return a dojo deferred object which Orion can call then() on?
Thanks,
Chris.
Please consider the environment before printing this e-mail.
_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev