我最近尝试将我相当复杂的应用程序从5更新为6(LGPL
,6.0-p20160713
,isc.version:
"v11.0p_2016-07-13/LGPL Development Only"
),不幸的是,它在所有3个浏览器中加载时都会中断(IE,FireFox,Chrome)。我还有一个非常小的设置的示例项目来测试smartgwt的各种功能,并且它从5升级到6没有任何问题。所以它必须与我的应用程序的设置。首先,我应该提一下,我多次清理浏览器缓存但没有成功。到了现在。
加载时我的应用程序中断了javascript控制台上出现的以下错误:
我的gwt.xml文件
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.6.1//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.6.1/distro-source/core/src/gwt-module.dtd">
<module>
<inherits name="com.my.application.Application"/>
<inherits name='com.google.gwt.user.User' />
<inherits name='com.smartgwt.SmartGwtNoScript' />
<inherits name='com.smartgwt.tools.SmartGwtTools' />
<inherits name="gwtupload.GWTUpload" />
<inherits name="com.allen_sauer.gwt.log.gwt-log-${gwt-log.level}" />
<inherits name="com.allen_sauer.gwt.log.gwt-log-RemoteLogger" />
<inherits name="com.google.gwt.inject.Inject"/>
<inherits name="org.fusesource.restygwt.RestyGWT" />
<inherits name="com.my.application.module.NewModule" />
<inherits name='com.pleft.SmartCKEditor' />
<set-property name="compiler.stackMode" value="emulated"/>
<set-configuration-property name="compiler.emulatedStack.recordLineNumbers" value="true"/>
<set-configuration-property name="compiler.emulatedStack.recordFileNames" value="true"/>
<stylesheet src="css/Upload.css" />
<stylesheet src="css/draggable.css" />
<stylesheet src='Application.css' />
<set-property name="user.agent" value="${gwt.user.agent}" />
<set-property name="log_GWTLogger" value="DISABLED" />
<set-property name="log_SystemLogger" value="DISABLED" />
<set-property name="log_DivLogger" value="DISABLED" />
<source path="client" />
<source path="shared" />
<entry-point class='com.my.application.client.EntryPoint' />
</module>
看起来isc
js对象未正确或完全初始化。在js控制台中,我可以看到它存在,但它缺少例如Page
对象或Log
对象。
恢复SmartGWT版本5,一切都像魅力一样。任何人都可以提供一些见解吗?谢谢!
修改:
我的Application.html引导程序文件:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<META http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="expires" content="0">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<title>Odyssey</title>
<link rel="icon" type="image/png" href="favicon.png">
<link rel="stylesheet" href="css/datepicker.css">
<script src="js/prototype.js" type="text/javascript"></script>
<script src="js/scriptaculous.js" type="text/javascript"></script>
<script src="js/cropper.js" type="text/javascript"></script>
<script src="js/datepicker.js" type="text/javascript"></script>
<script src="js/CropImageManager_script.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript" src="com.my.application.Application.nocache.js"></script>
<script> var isomorphicDir = "sc/";</script>
<script src="sc/initsc.js"></script>
<script src="sc/modules/ISC_Core.js"></script>
<script src="sc/modules/ISC_Foundation.js"></script>
<script src="sc/modules/ISC_Containers.js"></script>
<script src="sc/modules/ISC_Grids.js"></script>
<script src="sc/modules/ISC_Forms.js"></script>
<script src="sc/modules/ISC_RichTextEditor.js"></script>
<script src="sc/modules/ISC_Calendar.js"></script>
<script src="sc/modules/ISC_DataBinding.js"></script>
<script src="sc/skins/Enterprise/load_skin.js"></script>
<script src="ckeditor/ckeditor.js"></script>
</head>
<body>
</body>
</html>
答案 0 :(得分:0)
我找到了罪魁祸首。由于某种原因,包含与GWT和SmartGWT无关的js脚本导致了这种故障。
<script src="js/prototype.js" type="text/javascript"></script>
<script src="js/scriptaculous.js" type="text/javascript"></script>
<script src="js/cropper.js" type="text/javascript"></script>
<script src="js/datepicker.js" type="text/javascript"></script>
<script src="js/CropImageManager_script.js" type="text/javascript"></script>
我删除了Application.html
中包含这些脚本的行,因为我的应用程序不再使用它们(它们是以前版本的剩余部分),现在它编译并运行正常。