报错信息:
Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) @com.gwtext.client.widgets.Component::checkExtVer()([]): 无法获取未定义或 null 引用的属性“StatusBar”
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249)at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeBoolean(ModuleSpace.java:199)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeBoolean(JavaScriptHost.java:35)
at com.gwtext.client.widgets.Component.checkExtVer(Component.java)
at com.gwtext.client.widgets.Component.<clinit>(Component.java:108)
... 12 more
MyTestGwt.gwt.xml 文件部分内容:
<module rename-to='mytestgwt'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<inherits name='com.google.gwt.json.JSON'/>
<!-- GWT-EXT -->
<inherits name="com.gwtext.GwtExt"/>
<!-- Specify the app entry point class. -->
<entry-point class='com.test.client.MyTestGwt'/>
项目目录:
问题已经找到解决方法。
2.在项目主页面 html (我的主页 MyTestGwt.html) 文件中添加如下内容:
<div id="loading">
<div class="loading-indicator">
<img src="mytestgwt/js/ext/resources/images/default/shared/large-loading.gif" width="32" height="32"
style="margin-right:8px;float:left;vertical-align:top;"/>载入GWT-EXT模块JS脚本<br/>
<span id="loading-msg">加载图片</span></div>
</div>
<!--include the Ext CSS, and use the gray theme-->
<link rel="stylesheet" type="text/css" href="mytestgwt/js/ext/resources/css/ext-all.css"/>
<!--include the Ext Core API-->
<script type="text/javascript">document.getElementById('loading-msg').innerHTML = '加载核心代码...';</script>
<script type="text/javascript" src="mytestgwt/js/ext/adapter/ext/ext-base.js"></script>
<!--include Ext -->
<script type="text/javascript">document.getElementById('loading-msg').innerHTML = '加载界面组件...';</script>
<script type="text/javascript" src="mytestgwt/js/ext/ext-all.js"></script>
<script type="text/javascript" src="mytestgwt/js/ext/ext-lang-zh_CN.js"></script>
<!--include Extend -->
<script type="text/javascript">document.getElementById('loading-msg').innerHTML = '加载扩展组件...';</script>
<script type="text/javascript" src="mytestgwt/js/extux/uxpagingtoolbar.js"></script>
<script type="text/javascript" src="mytestgwt/js/extux/uxutil.js"></script>
<script type="text/javascript" src="mytestgwt/js/extux/exportfile.js"></script>
<!--include the application JS-->
<script type="text/javascript">document.getElementById('loading-msg').innerHTML = '加载应用组件...';</script>
<script type="text/javascript" language="javascript" src="mytestgwt/mytestgwt.nocache.js"></script>
<!--hide loading message-->
<script type="text/javascript">Ext.get('loading').fadeOut({remove: true, duration:.25});</script>