Is there any way to stop the full postback when there is a global error on server while before processing request?
We are injecting a event handle for the "ClientEvent" aka "Error" ClientSideEvent to handle errors during a warp refresh on the client machine.
We want to cancel the full postback and just have the page sit as is when the WARP encounters an error.
We have tried the following but none of these methods work:
function OnWarpClientError(oPanel, oEvent, flags){
//Todo: is there any method in the CB manager to cancel full postback? //var serverError = ig_shared.getCBManager().serverError;
//NOTE: none of these work oEvent.cancel = true; oEvent.fullPostBack = false; oEvent.cancelResponse = true; return false;
}
Stepping through the .js file labeled "//vs 021209" in 2009.1 controls there isnt any completely obvious way to do this... i am seeing some logic where return types are being ignored:
o._fire = function(evt, p3) { evt = this._evts ? this._evts[evt] : null; if(!evt) return false; var evtO = new ig_EventObject(); ig_fireEvent(this, ig_shared.replace(evt, """, "'"), evtO, p3); if(evtO.cancelResponse) return 'cancelResponse'; if(evtO.fullPostBack) return 'fullPostBack'; return evtO.cancel; }
o.onError = function(flags){this._fire(4, flags);} //NOTE not checking return value!
this._doResponse = function(cb) {
...
if(postKey.indexOf('<error>') == 0) { i = this._panels.length; this.serverError = txt.split(this._sep)[3]; while(i-- > 0) { e = this._panels[i].control; if(e && e.onError) e.onError(1); //NOTE not checking return value! } var lsnrs = ig_shared._cbError; i = lsnrs ? lsnrs.length : 0; while(i-- > 0)try { lsnrs[i](cb.control,cb.triggers,this.serverError); }catch(e){} this._restore(); try { this._submit(9); }catch(e){} return true; }