Reputation: 17010
How to redefine Ext.LoadMask.msg
globally through all application on ExtJS 4.1 MVC?
Upvotes: 3
Views: 1134
Reputation: 23983
The following works for ExtJS 4
Try the following successful tested code:
if (Ext.view.AbstractView) {
Ext.view.AbstractView.prototype.loadingText = 'Your message here ...';
}
You might also use this:
if (Ext.LoadMask) {
Ext.LoadMask.prototype.msg = 'Your message here ...';
}
The problem here is that changing the message text will affect the LoadMask message-text itself but most components override it when instantiating a loadmask. That means you cannot globally change it.
But the first example should cover most cases. Anyway, you can use this struct for all components that override the message and change the default message for each of them.
For example you want to change the load message of all comboboxes:
if (Ext.view.BoundList) {
Ext.LoadMask.prototype.msg = 'Your message here ...';
}
Upvotes: 3