views:

94

answers:

1

I want DWR to transparently batch all remote calls that are done in the course of handling the same event.

The reason is that handling an event in Javascript must only take a short time and nothing else can happen during the same time. So if I am going to do many calls, I would like to DWR batch them transparenty. Is that possible? How?

A: 

DWR's website explains Call Batching.

From another DWR page:

Remote calls can be batched together to reduce latency. Options can also be set on the endBatch() method:

dwr.engine.beginBatch();
Remote.methodInBatch1(params, callback1);
Remote.methodInBatch2(params, callback2);
dwr.engine.endBatch({
  timeout:3000
});
Matt Fisher