[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] Handling long running validation

Mark, Simon

 

Thanks a lot for that, I must have missed that bit of the docs.

 

Chris.

 

From: orion-dev-bounces@xxxxxxxxxxx [mailto:orion-dev-bounces@xxxxxxxxxxx] On Behalf Of Simon Kaegi
Sent: 10 July 2012 20:17
To: Orion developer discussions
Subject: 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

Inactive hide details for "Chris Whitty" ---07/10/2012 11:10:23 AM---Hi all,"Chris Whitty" ---07/10/2012 11:10:23 AM---Hi all,

From:


"Chris Whitty" <chris.whitty@xxxxxxxxxxxxxx>

To:


"Orion developer discussions" <orion-dev@xxxxxxxxxxx>

Date:


07/10/2012 11:10 AM

Subject:


[orion-dev] Handling long running validation

Sent by:


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.


This message has been scanned by MailController.

_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev

This message has been scanned by MailController.

 

GIF image

PNG image

PNG image

GIF image