[英]Can't use GWTquery in GWT
I am trying to use GWTQuery in my GWT project. 我试图在我的GWT项目中使用GWTQuery。 For that, i downloaded the
jar
file from the official source. 为此,我从官方来源下载了
jar
文件。 Then I added it to the lib
folder within the WEB-INF
folder, and configured the build path to include that. 然后我将它添加到
WEB-INF
文件夹中的lib
文件夹,并配置构建路径以包含它。 After that, i did all the necessary imports, which are showing no error, thus proving that they have been successfully imported. 之后,我做了所有必要的导入,没有显示任何错误,从而证明它们已成功导入。
However while using a simple selector function like $("#child").text('foo');
但是使用简单的选择器函数,如
$("#child").text('foo');
, I am getting an error message No source code is available for type com.google.gwt.query.client.GQuery; ,我收到一条错误消息没有源代码可用于com.google.gwt.query.client.GQuery类型; did you forget to inherit a required module?
你忘了继承一个必需的模块吗? .
。 Can anyone tell me why is this happening, and how might I correct it?
任何人都可以告诉我为什么会这样,我怎么能纠正它?
This is no Maven setup, so please don't suggest one! 这不是Maven设置,所以请不要建议一个! (This is the XML file:)
(这是XML文件:)
You have forgotten the inherits tag to be included in your .gwt.xml file 您忘记了要包含在.gwt.xml文件中的inherits标记
<inherits name='com.google.gwt.query.Query'/>
Ensure you follow each step from the guideline wiki - http://code.google.com/p/gwtquery/wiki/GettingStarted#Introduction 确保您遵循指南维基中的每一步 - http://code.google.com/p/gwtquery/wiki/GettingStarted#Introduction
You should use a Source Tab View to edit the XML file if you are not comfortable with the Design Tab View 如果您不熟悉“ 设计”选项 卡视图 ,则应使用“ 源”选项卡视图编辑XML文件
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.