[英]Uncaught ReferenceError: wlInitOptions is not defined
I'm getting this error since i upgraded my worklight developer edition to v5.0.6: 自从我将worklight开发人员版本升级到v5.0.6以来,我收到此错误:
wlclient init started worklight.js:1118
Uncaught ReferenceError: wlInitOptions is not defined
Look inside your application's js folder (yourProject\\apps\\yourApp\\common\\js). 查看应用程序的js文件夹(yourProject \\ apps \\ yourApp \\ common \\ js)。 Make sure it contains an initOptions.js file and that its content is as follows (you can also create a new application and copy the file from there):
确保它包含一个initOptions.js文件,并且其内容如下(您也可以创建一个新的应用程序并从此处复制该文件):
var wlInitOptions = {
// # Should application automatically attempt to connect to Worklight Server on application start up
// # The default value is true, we are overriding it to false here.
connectOnStartup : false
};
if (window.addEventListener) {
window.addEventListener('load', function() { WL.Client.init(wlInitOptions); }, false);
} else if (window.attachEvent) {
window.attachEvent('onload', function() { WL.Client.init(wlInitOptions); });
In addition, the HTML file must not contain a call to WL.Client.init in the <body>
tag. 此外,HTML文件不得在
<body>
标记中包含对WL.Client.init的调用。 It should look like this: 它看起来应该像这样:
<body id="content" style="display: none;">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.