3
votes

I am using ExtJS 3 now, and I really miss setLoading function from ExtJS 4.

Looked throght the docs carefully, did not find it.

How can I set/remove loading state on any component in ExtJS 3.4?

2
You should ask your question outright instead of implying it.Eric

2 Answers

2
votes

You should create a new LoadMask Object for the component

var loadMask = new Ext.LoadMask(cmp, {msg:'Wait message'});

and then you can show or hide the mask

loadMask.show(); 
loadMAsk.hide();
0
votes

If you are using a store you could also provide the store as a property for the load mask's config property. This way you don't have to actually do a hide or show in the store's handler.

var store = new Ext.data.Store();
var loadMask = new Ext.LoadMask(cmp, {msg:'Wait message', store: store});

from Ext's LoadMask documentation:

Optional Store to which the mask is bound. The mask is displayed when a load request is issued, and hidden on either load sucess, or load fail.