Madhu
Madhu

Reputation: 5766

Call ordering in DWR

There is an option to make DWR AJAX calls to execute in sequence thru the following option

DWREngine.setOrdered(true)

But this is working globally (for entire application). I want to make enable this option only to certain Classes. Is it possible?

Upvotes: 1

Views: 242

Answers (1)

OJVM
OJVM

Reputation: 1481

This can be done in the following way

DWREngine.beginBatch();
BatchCallClass.method1(testCallBatchingCallback1);
BatchCallClass.method2(testCallBatchingCallback2);
MathDelegate.multiply(8, 4, testCallBatchingCallback3);
DWREngine.endBatch();

in this way you avoid to change the behaivor of all you entire application.

Upvotes: 1

Related Questions