rem:  var currentTime = new Date().getTime(); if (document.xformsEvents.length == 0) document.xformsEventsFirstEventTime = currentTime;   for (var eventIndex = 0; eventIndex < events.length; eventIndex++) document.xformsEvents.push(events[eventIndex]);   document.xformsExecuteNextRequestInQueue++; if (incremental && !(currentTime - document.xformsEventsFirstEventTime > XFORMS_DELAY_BEFORE_FORCE_INCREMENTAL_REQUEST_IN_MS)) window.setTimeout(xformsExecuteNextRequest, XFORMS_DELAY_BEFORE_INCREMENTAL_REQUEST_IN_MS); else xformsExecuteNextRequest(true); return false; 
add: var newEvents = []; for (var eventIndex = 0; eventIndex < events.length; eventIndex++) { var event = events[eventIndex]; var target = event[0]; var eventName = event[1]; var value = event[2]; var other = event[3]; newEvents.push(new ORBEON.xforms.Server.Event( target == undefined ? null : ORBEON.xforms.Controls.getForm(target), target == undefined ? null : target.id, other == undefined ? null : other.id, value, eventName, null, null)); } ORBEON.xforms.Server.fireEvents(newEvents, incremental); 
context: function xformsFireEvents(events, incremental) {    // Store the time of the first event to be sent in the queue    var currentTime = new Date().getTime();    if (document.xformsEvents.length == 0)        document.xformsEventsFirstEventTime = currentTime;    // Store events to fire    for (var eventIndex = 0; eventIndex < events.length; eventIndex++)        document.xformsEvents.push(events[eventIndex]);    // Fire them with a delay to give us a change to aggregate events together    document.xformsExecuteNextRequestInQueue++;    if (incremental && !(currentTime - document.xformsEventsFirstEventTime >            XFORMS_DELAY_BEFORE_FORCE_INCREMENTAL_REQUEST_IN_MS))        window.setTimeout(xformsExecuteNextRequest,            XFORMS_DELAY_BEFORE_INCREMENTAL_REQUEST_IN_MS);    else xformsExecuteNextRequest(true);    return false;}
meta: 9823	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9823/655b9d4855d6c79702dc2b2863a5a367c4587ac8/xforms.js/buggy/src/examples/web/ops/javascript/xforms.js