在 Gwt WindowBuilder 中编辑 CSS
我在一个项目中使用 GWT,最近开始在 Eclipse 中使用 WindowBuilder。我在 WindowBuilder 中创建了一个新类并添加了一些小部件。所有有效的东西。但是,当我尝试编辑某些面板的 CSS 并单击编辑“styleName”字段时,我收到一条错误消息,其中显示:
"There are no CSS files referenced from modules HTML."
我已尝试在基本 html 文件和中添加指向样式表的链接Web.gwt.xml 文件,但这似乎不起作用。我得到同样的错误。
在其他类中,我使用了 UiBinder 并在 XML 文件中添加了样式,但该类不使用 UiBinder。那么如何将 CSS 文件与类关联起来,以便 WindowBuilder 允许我编辑样式呢?
在这个项目中,我没有或使用“war”目录。该项目是一个 couchapp,因此我将其编译到另一个目录并将其从那里推送到 CouchDB。似乎在其他项目中,如果原始项目设置有一个 war 目录,则此功能可以正常工作。
I am using GWT in a project and recently started using the WindowBuilder in Eclipse. I created a new class and in the WindowBuilder and added some widgets. All that works and everything. However, when I try to edit the CSS for some of the panels and I click to edit the "styleName" field I get an error message which says:
"There are no CSS files referenced from modules HTML."
I've tried adding a link to a style sheet in my base html file and in the Web.gwt.xml file, but that does not seem to work. I get the same error.
In other classes I have used UiBinder and added the style in the XML file, but this class doesn't use UiBinder. So how do I associate a CSS file with the class so that the WindowBuilder allows me to edit the style?
In this project I don't have or use a "war" directory. The project is a couchapp, so I compile it to another directory and push it to CouchDB from there. It seems that in other projects, where there is the original project setup with a war directory, this feature works properly.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我遇到了同样的问题,并且能够通过将 CSS 资源从 war 目录移动到类路径来解决它,特别是在通过“”。
项目布局(由于 Eclipse 插件错误,模块描述符位置奇怪):
演示.gwt.xml:
I had the same problem and was able to work around it by moving my CSS-resources from the war-directory to the classpath, specifically inside a package that is declared as a "public path" inside the GWT module descriptior via "<public path='...' />".
Project layout (odd location for module descriptor because of Eclipse Plugin Bug):
Demo.gwt.xml:
要解决此问题:
在模块文件 gwt.xml 中,输入:
菜单中的下一步:Project ->干净。。
To fix this problem:
In module file gwt.xml type:
Next in menu: Project -> clean.