Reputation: 528
i tried this
var myMask = new Ext.LoadMask({msg:"GOINGGGGGG",target:Ext.getBody(),store:Ext.getStore('Bla.core.ext.store.Client')});
myMask.bindStore(Ext.getStore('Bla.core.ext.store.Client'));
both adding the store in the config, and doing a bindstore.
The end goal is having multiple stores report to 1 loadmask , but i can't even get 1 to work ?
Upvotes: 0
Views: 1073
Reputation: 5856
LoadMask should be only used on components, not elements - Ext.getBody() returns element. To mask elements you must use Ext.dom.Element.mask
Other option would be to create a Viewport that takes all browser space and use LoadMask on that. However, if you want multiple stores to use the same mask, you need to bind your store yourself because bindStore first unbinds the old store and then binds the new one.
BTW, binding is a simple thing - install listener on the store that shows the mask before the store loads and hides it after data is loaded or the request failed.
Upvotes: 1