Is there a way to change Ext.LoadMask.msg
on ExtJS 4.1 MVC Application globally?
Asked
Active
Viewed 4,497 times
0

sra
- 23,820
- 7
- 55
- 89

s.webbandit
- 16,332
- 16
- 58
- 82
-
http://www.sencha.com/forum/showthread.php?145538-Override-default-loading-mask-msg – MMT Aug 31 '12 at 10:03
4 Answers
1
It should work with
// changing the msg text below will affect the LoadMask
Ext.define("Ext.locale.##.view.AbstractView", {
override: "Ext.view.AbstractView",
msg: "Loading data..."
});
for the most cases. Call this right after/within the onReady() function. Set ## to your locale language

sra
- 23,820
- 7
- 55
- 89
-
I'm using ExtJS MVC and have no `onReady()` function at all. I tried placing and loading it from my `view` MVC folder. No effect. – s.webbandit Aug 31 '12 at 09:49
-
@webbandit You simply have already one as a default in your MVC App but you can have a second for your localization. – sra Aug 31 '12 at 13:08
-
-
@AshwinP As written below the code-box in my post: `Set ## to your locale language` – sra Nov 20 '13 at 10:37
1
Ext.define("Ext.locale.de.view.AbstractView", {
override: "Ext.view.AbstractView",
loadingText: "Uebertrage Daten..." });
This works for me.

codethinker1985
- 11
- 2
-1
var myMask = new Ext.LoadMask(myPanel, {msg:"Please wait..."});
myMask.show();

AJJ
- 3,570
- 7
- 43
- 76
-
this one applies `LoadMask` to certain Component only. In your case - `myPanel`. I'm searching for global solution for whole Application. – s.webbandit Aug 31 '12 at 09:43
-
Use Ext.getBody() to get your entire window. Call this at appropriate place in your code. and pass the value to LoadMask() – AJJ Aug 31 '12 at 09:54
-
I have lots of `LoadMask`s in my App. I should call this method for every mask I have? – s.webbandit Aug 31 '12 at 10:20
-
That is the only way i think.. If you need to change the message at single sort then i feel u need to override the LoadMask method. But the better way is create a function like mask: function(body, msg) { new Ext.LoadMask(body, msg)} and call this function wherever needed. – AJJ Aug 31 '12 at 10:25