[fusion-commits] r1655 - trunk/lib
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Fri Nov 7 16:40:53 EST 2008
Author: madair
Date: 2008-11-07 16:40:52 -0500 (Fri, 07 Nov 2008)
New Revision: 1655
Modified:
trunk/lib/ApplicationDefinition.js
Log:
re #155: use setTimeout to call getAppDef so that ApplicationDefinition.parse will return before Fusion.setLaodState(LOAD_WIDGETS) gets called (otherwise Fusion.ApplicationDefinition is null). When the browser is set to read files from cache, the AppDef is retrieved from cache and the sequence of callbacks is executed too quickly
Modified: trunk/lib/ApplicationDefinition.js
===================================================================
--- trunk/lib/ApplicationDefinition.js 2008-11-07 21:12:01 UTC (rev 1654)
+++ trunk/lib/ApplicationDefinition.js 2008-11-07 21:40:52 UTC (rev 1655)
@@ -124,8 +124,7 @@
}
} else {
if (!this.sessionId) {
- var r = new Fusion.Lib.MGRequest.MGCreateSession();
- this.oBroker.dispatchRequest(r, OpenLayers.Function.bind(this.getAppDef, this));
+ window.setTimeout(OpenLayers.Function.bind(this.delayedDispatch,this),50);
} else {
this.getAppDef();
}
@@ -133,6 +132,11 @@
return true;
},
+ delayedDispatch: function() {
+ var r = new Fusion.Lib.MGRequest.MGCreateSession();
+ this.oBroker.dispatchRequest(r, OpenLayers.Function.bind(this.getAppDef, this));
+ },
+
getAppDef: function(xhr){
if (xhr) {
this.sessionId = xhr.responseText;
More information about the fusion-commits
mailing list