You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by jm...@apache.org on 2007/06/15 18:44:58 UTC
svn commit: r547765 - /incubator/xap/trunk/codebase/src/xap/Xap.js
Author: jmargaris
Date: Fri Jun 15 11:44:57 2007
New Revision: 547765
URL: http://svn.apache.org/viewvc?view=rev&rev=547765
Log:
Fix plugin loading issue with createEmbeddedApplication()
Modified:
incubator/xap/trunk/codebase/src/xap/Xap.js
Modified: incubator/xap/trunk/codebase/src/xap/Xap.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/Xap.js?view=diff&rev=547765&r1=547764&r2=547765
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/Xap.js (original)
+++ incubator/xap/trunk/codebase/src/xap/Xap.js Fri Jun 15 11:44:57 2007
@@ -34,16 +34,30 @@
*/
Xap = {};
-/**
- * START OF PUBLIC METHODS FOR THE XAP CLASS USED TO
- * CREATE THE APPLICATION WITH IN A WEB PAGE.
- */
-
+Xap._override = function () {
+ // override dojo.hostenv.getBaseScriptUri() to return
+ // a blank string that allows our mapping [plugin name to path] to work
+ if(dojo.hostenv.getBaseScriptUri != Xap.dojo_hostenv_getBaseScriptUri) {
+ dojo.hostenv.getBaseScriptUri = Xap.dojo_hostenv_getBaseScriptUri;
+ }
+
+ // We still want dojo.uri.dojoUri() function to work as before, so override that as well.
+ // The change above also affects dojo.uri.moduleUri() function, but that
+ // function doees not seem to be used anywhere
+ if(dojo.uri.dojoUri != Xap.dojo_uri_dojoUri) {
+ dojo.uri.dojoUri = Xap.dojo_uri_dojoUri;
+ }
+}
+/**
+ * START OF PUBLIC METHODS FOR THE XAP CLASS USED TO
+ * CREATE THE APPLICATION WITH IN A WEB PAGE.
+ */
+
/**
* Static method to create an application. jkl jk
*<pre>
@@ -65,18 +79,8 @@
*/
Xap.createApplication = function(applicationConfig) {
- // override dojo.hostenv.getBaseScriptUri() to return
- // a blank string that allows our mapping [plugin name to path] to work
- if(dojo.hostenv.getBaseScriptUri != Xap.dojo_hostenv_getBaseScriptUri) {
- dojo.hostenv.getBaseScriptUri = Xap.dojo_hostenv_getBaseScriptUri;
- }
-
- // We still want dojo.uri.dojoUri() function to work as before, so override that as well.
- // The change above also affects dojo.uri.moduleUri() function, but that
- // function doees not seem to be used anywhere
- if(dojo.uri.dojoUri != Xap.dojo_uri_dojoUri) {
- dojo.uri.dojoUri = Xap.dojo_uri_dojoUri;
- }
+ // override dojo base path
+ Xap._override();
Xap.require("xap.application.Application");
var application = new xap.application.Application(applicationConfig);
@@ -115,6 +119,10 @@
* @type Array
*/
Xap.createEmbeddedApplications = function() {
+
+ // override dojo base path
+ Xap._override();
+
Xap.require("xap.html.HtmlConnector");
xap.html.HtmlConnector.scanPage();