开发环境:Gwt2.0.3 , SmartGwt2.1, MyEclipse7.5+gwt plugin。
错误提示:
[WARN] 404 - GET /sc/skins/Enterprise/skin_styles.css (127.0.0.1) 1421 bytes
。。。
[WARN] 404 - GET /sc/skins/Enterprise/images/blank.gif (127.0.0.1) 1422 bytes
。。。
[WARN] 404 - GET /sc/skins/Enterprise/images/headerIcons/close.png (127.0.0.1) 1434 bytes
。。。
问题:页面中的 sg 组件无法正常显示(只有文字,没有图片)
可以检查以下位置:
1)*.gwt.xml 中添加:
<inherits name='com.smartgwt.SmartGwt'/>
<inherits name='com.smartclient.theme.enterprise.EnterpriseResources'/> (皮肤可从skin包中更换,这里仅作参照)
如果是sgee,则可以是:
<inherits name="com.smartgwtee.SmartGwtEE"/>
<inherits name="com.smartclient.theme.enterprise.EnterpriseResources" /> (皮肤可从skin包中更换,这里仅作参照)
2)项目首页 *.html 的 <head></head>标签中添加:
<script> var isomorphicDir = "projectName/sc/"; </script>
其中projectName应换成自己项目名,一般可以在 *.gwt.xml 中的 rename-to 找到匹配的名称,或者直接看 war 目录下自动编译的项目名称,通常是小写的。