0

I have sendRequest using RPCManager in smartclient. but I have to structure chaining execution. I read on internet about jQuery deferred and promise function. But I wonder whether smartclient support execution in sequential task.

Thank you.

extjs user
  • 263
  • 7
  • 17

1 Answers1

0

queueing may be what are you looking for?

For example:

RPCManager.startQueue();
grid.updateData(record1, function(dsResponse, data, dsRequest){/*callback1*/});
grid.updateData(record2, function(dsResponse, data, dsRequest){/*callback2*/});
RPCManager.sendQueue(function(responses){/*finalCallback*/});

will execute the updates sequentially, in a single request, and the callbacks will be executed sequentially:

  1. callback1
  2. callback2
  3. finalCallback
claudiobosticco
  • 413
  • 2
  • 8