if (!XSP._inheritedPartialRefresh) { XSP._inheritedPartialRefresh = XSP._partialRefresh; XSP._partialRefreshQueue= []; XSP._canSubmit= XSP.canSubmit; XSP.canSubmit= function() { return true; // can always submit }; XSP._partialRefresh = function(method, form, refreshId, options) { this._partialRefreshQueue.push([method, form, refreshId, options]); if(XSP._partialRefreshQueue.length<=1) setTimeout(XSP._partialRefreshProcess, 100); }; XSP._partialRefreshProcess= function() { if(XSP._partialRefreshQueue.length==0) return; var arguments= XSP._partialRefreshQueue[0]; // Publish init dojo.publish('partialrefresh-init', arguments); XSP._inheritedPartialRefresh.apply(XSP, arguments); XSP.allowSubmit(); }; dojo.subscribe('partialrefresh-end', function() { XSP._partialRefreshQueue.shift(); if(XSP._partialRefreshQueue.length) setTimeout(XSP._partialRefreshProcess, 100); }) }