开发者

Call ordering in DWR

开发者 https://www.devze.com 2023-01-04 22:49 出处:网络
There is an option to make DWR AJAX calls to execute 开发者_运维问答in sequence thru the following option

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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消