Reputation:
I have build a small app with extjs4 using MVC architecture. When user login first time the application needs 5-10 secs to load. How do I place a loading image that will inform user to wait while app is initializing? (like shencha's please wait image while examples page is loading)
Thanks
Tom
Upvotes: 3
Views: 1922
Reputation: 47
Or you can use a modal MessageBox to achieve the same:
Ext.MessageBox.show({
title: 'Please wait',
msg: 'Loading...',
progressText: 'Loading...',
width:300,
wait: true,
waitConfig: {interval: 200},
progress:true,
closable:false,
modal: true
});
When done, simple call the following:
Ext.MessageBox.hide();
Upvotes: 0
Reputation: 4623
To do this, I have added a variable Ext.LoadMask
in my controller like this :
var loginMask = new Ext.LoadMask(Ext.getBody(), {msg:"Please wait ..."});
then, before calling function that call the server side (using AJAX) for authentication I call the show function like this :
loginMask.show();
after that, I mean after the server response I call :
loginMask.hide();
and this is working for me.
Upvotes: 2
Reputation: 473
Loadmask might be what you need http://docs.sencha.com/ext-js/4-0/#!/api/Ext.LoadMask
Upvotes: 0