Is there a way to make a thread sleep (like "Thread.Sleep(nnn)" in C#) in order to make it possible to wait for a property set by an ESQ return, such as the code example below ?

...

this.set(("EsqOk", false);

esq.getEntityCollection(function(result) {

     ...

     // ESQ return

     ...

     this.set(("ValidationMessage", "xxxxxxxx");

     this.set("EsqOk", true);

     }

}, this);

// main thread flow

while (!this.get("EsqOk") {

     this.Thread.Sleep(500);

}

return {

     invalidMsg: this.get("ValidationMessage")

};     

 

Like 0

Like

1 comments

No. It's a bad idea to stop the application for data selection. It's better to use masks. Like MaskHelper.showBodyMask and MaskHelper.hideBodyMask

Show all comments