As you can see, I've moved this override to the launch function. You will also realize that I am retrieving my values from elements in the page after it has been loaded which is the reason for applying the override in the launch function.

This works if I put this code directly above the store definition in the corresponding store file (app/store/myStore.js). Because I'd like to apply this to every store (in app/store) it would make sense to override the class in the main application file (app.js). But above the application definition doesn't work:

I think the most widely used technique for applying overrides in ExtJS 4 is:

Code:

Ext.require('classname', function() {
// Callback for when the class has been loaded. Apply the overrides here.
});

This would be placed before the call to Ext.application().

I'm a bit confused by the use of Ext.override() to set extraParams on Ext.Ajax.request. I don't really understand how that ever worked. As far as I can tell it'll be setting the extraParams on the prototype of the request function. Unless you're doing something really odd like new Ext.Ajax.request({...}) I can't see why they'd get picked up. Wouldn't this be a little more straightforward?

You also mentioned that it was odd to use Ext.Ajax.requests, is there an alternative I'm not aware of?

No, that's fine. What I meant was that it would be odd to invoke it using the new operator. I only mentioned this because it was the only way I could think of that your code could possibly have worked.

As for the elements in the page. What are they, hidden input fields? Depending on your choice of server-side technology you might find it simpler to inject those values directly as JavaScript variables rather than going via hidden inputs. You should take care to consider escaping the values appropriately if you do go down this route.

From a timing perspective, another possible alternative might be to do this using the Ext.Ajax.beforerequest event. This would ensure that you are making changes as late as possible before the first Ajax request takes place.