I have a bigger application written with ExtJs 7. Now I need to add an extra-Parameter to all ajax-calls and ajax-store-calls from a certain point on.
To change all ajax-calls and all stores would be a lot of work, so the idea is to define an override or prototype, and all calls done after that should use the new parameter.
I tried:
Ext.override(Ext.Ajax, { extraParams: {myNewParam:'New Param' }});
and
Ext.Ajax.extraParams =
{ myNewParam:'New Param'
};
and
Ext.Ajax.prototype.extraParams =
{ myNewParam:'New Param'
};
but myNewParam is either not transmitted or I get JavaScript errors.
What is the correct way to do it?