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.
精彩评论