All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.directwebremoting.dwr-bayeux.js Maven / Gradle / Ivy

Go to download

DWR is easy Ajax for Java. It makes it simple to call Java code directly from Javascript. It gets rid of almost all the boiler plate code between the web browser and your Java code.

The newest version!

dwr.bayeux = { _origSendData: dwr.engine.transport.send };

dojo.require("dojox.cometd");

dwr.engine.transport.send = function(batch) {
  batch.map.batchId = dwr.engine._nextBatchId;
  dwr.engine._nextBatchId++;
  dwr.engine._batches[batch.map.batchId] = batch;
  dwr.engine._batchesLength++;
  batch.completed = false;

  for (var i = 0; i < batch.preHooks.length; i++) {
    batch.preHooks[i]();
  }
  batch.preHooks = null;
  
  // convert integers to strings
  var count=batch.map['callCount'];
  batch.map['callCount']=''+count;
  batch.map['batchId']=''+batch.map['batchId'];
  for (var i=0; i




© 2015 - 2025 Weber Informatics LLC | Privacy Policy