PDA

View Full Version : How to Load mask to a window/store before loading ?



gameboy87
30 Aug 2012, 11:49 PM
I call upon different functions to load a store and from the the load event of the store's listener, a function is called to load the window and distribute the data to all components in it. So, it takes some 2 seconds for the window to load. Can I use some dummy LoadMask before loading the window so that the user knows something is going to Load ?

Thanks.

redraid
30 Aug 2012, 11:56 PM
Try this:
var el = window.getEl();

el.mask('Mask text');
...
el.unmask();

gameboy87
31 Aug 2012, 1:24 AM
Printing,

var window= Ext.create('Ext.window.Window',{
......
.....
});
console.log(window.getEl());

shows undefined.....
Please help....


Try this:
var el = window.getEl();

el.mask('Mask text');
...
el.unmask();

Farish
31 Aug 2012, 1:28 AM
probably you have not displayed the window. thats why its undefined. use window.show() before using window.getEl()

gameboy87
31 Aug 2012, 1:43 AM
Thanks Farish & redraid . ...:)
After rendering/showing the window the mask is working. Voila !
But, I want to display before the window gets displayed on screen. May I know how to do that ?

Thanks.


probably you have not displayed the window. thats why its undefined. use window.show() before using window.getEl()

redraid
31 Aug 2012, 2:00 AM
You can mask document body:

Ext.getBody().mask('test')
...
Ext.getBody().unmask();


//wbr

gameboy87
31 Aug 2012, 2:07 AM
I was trying the same & got that working. Thanks guys ! =D>