I was assigned to create an extjs4 app which can be used on desktop browsers and on mobile browsers. I know that extjs4 is not really for mobile (definitely works on mobile but there's a huge performance difference) but we are also supporting our website for mobile for temporary usage (Future plan: we'll create a Sencha Touch 2 version of this).
Anyways, I'm currently working on improving the responsiveness of the app. Responsiveness in terms of button clicks, opening windows, etc. I would like to show a splash message upon opening an Ext.Window components. This splash message will be visible until all components of the window have been created. So, I was trying to achieve this by listening to the afterlayout event of the window.
On my custom component, which extends Ext.Window, I have this code:
constructor : function() {
var me = this;
...
me.callParent(arguments);
me.on('afterlayout', {
console.log('AFTER LAYOUT');
if (mySplash != null)
mySplash.hide();
}
}
I have observed that afterlayout events have been called multiple times. So, I have checked the api documentation of Sencha ExtJS 4.2 about afterlayout event of Ext.Window. And it says:
Fires when the components in this container are arranged by the associated layout manager.
So, how would I check the last afterlayout event of my window/popup? I need this so that if I have determined this, I could have called here my close splash function.
Please help. Thanks in advance.