-
19 Jul 2012 11:16 PM #1
load mask
load mask
function mask {
var myMask = new Ext.LoadMask(Ext.getBody(), {msg:"Please wait..."});
myMask.hide();
}
I put this function in launch, it doesn't work.
Any problem with my code??
Is there any alternative?
-
20 Jul 2012 2:24 PM #2
What you are expecting?
You are creating the mask then immediately hide it without show()...UI: Sencha Architect 2.x / ExtJS 4 MVC
Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
Application Server: Glassfish 3.1.x
Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5
If you like my answer please vote!
-
22 Jul 2012 6:31 PM #3
Sorry , i forgot to post some codes.
I expect that the mask appears when retrieving data .
code:
if(....){
......
}
else{
var myMask = new Ext.LoadMask(Ext.getBody(), {msg:"Please wait..."});
myMask.show();
bLoadingInformation = true;
setTimeout('resetLoadingInformation()', defTimeout);
}
setTimeout('resetLoadingInformation()', defTimeout) >> error msg : resetLoadingInformation() is not defined.
-
23 Jul 2012 6:52 AM #4
Where is method resetLoadingInformation() defined?
UI: Sencha Architect 2.x / ExtJS 4 MVC
Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
Application Server: Glassfish 3.1.x
Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5
If you like my answer please vote!
-
23 Jul 2012 7:16 PM #5
I solved the problem.
code :
var defTimeout=1500;
function handleServerData(data){
if (bLoadingInformation) {
.....
setTimeout(function() { bLoadingInformation = false;Ext.Viewport.setMasked(false);}, defTimeout);
......
}var mask =Ext.Viewport.setMasked({ xtype: 'loadmask', message: 'Please wait...', indicator:true});
else{
......
bLoadingInformation = true;setTimeout(function() { bLoadingInformation = false;Ext.Viewport.setMasked(false);}, defTimeout);
......
}
}


Reply With Quote