GWT(2.7)在GWTP(1.5.1)项目中的UiBinder中声明GwtQuery(1.0.6)Widget时编译失败 [英] GWT (2.7) Compile fails when declaring a GwtQuery (1.0.6) Widget in UiBinder in GWTP (1.5.1) project

查看:204
本文介绍了GWT(2.7)在GWTP(1.5.1)项目中的UiBinder中声明GwtQuery(1.0.6)Widget时编译失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在我的GWTP项目的MyView.ui.xml UiBinder中声明一个GwtQuery DragAndDropCellTree时,我不能GWT编译它:

  [3] xmlns:gq =urn:import:gwtquery.plugins.droppable.client.gwt
...
[59]< gq:DragAndDropCellTree>< / gq :DragAndDropCellTree>




[错误]没有类匹配urn:import中的DragAndDropCellTree gwtquery.plugins.droppable.client.gwt:< gq:DragAndDropCellTree>(:59)
$ b

[错误]'gen / my / package / com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java'中的错误
[错误]无法解析' my.package.MyView.Binder'通过延期绑定[/ b]

[WARN]对于以下类型,生成的源文件从未提交(您忘记调用commit )?)
[WARN] my.package.MyView_BinderImpl


我遵循 GwtQuery配置在Eclipse中使用Maven。
我不知道我的问题在于GWT,GWTP,Maven还是GwtQuery



任何想法我做错了什么?




  • 如果没有声明,但在UiBinder中导入gwtquery.plugins.droppable.client.gwt,我可以成功编译

  • 我可以在MyView.java而不是UiBinder中声明时成功编译
  • 在声明任何其他DragAndDrop时无法编译,也不能在声明时一个用于不同的UiBinder


解决方案

我认为我想到了这一点。
UiBinder中使用的任何Widget必须具有零参数构造函数 ...



DragAndDropCellTree没有零参数构造函数。因此,我可以在MyView.java中声明而不是在MyView.ui.xml中声明。



所以这是一个GWT GwtQuery问题。

>

这些是替代品仍然使用UiBinder


When I simply just declare a GwtQuery DragAndDropCellTree in my MyView.ui.xml UiBinder in my GWTP project, I cannot GWT Compile it:

[3]  xmlns:gq="urn:import:gwtquery.plugins.droppable.client.gwt"
...
[59]       <gq:DragAndDropCellTree></gq:DragAndDropCellTree>

[ERROR] No class matching "DragAndDropCellTree" in urn:import:gwtquery.plugins.droppable.client.gwt: < gq:DragAndDropCellTree > (:59)

[ERROR] Errors in 'gen/my/package/com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java' [ERROR] Failed to resolve 'my.package.MyView.Binder' via deferred binding

[WARN] For the following type(s), generated source was never committed (did you forget to call commit()?) [WARN] my.package.MyView_BinderImpl

I followed GwtQuery Configuration using Maven in Eclipse. I'm not sure if my problem lies in GWT, GWTP, Maven, or GwtQuery

Any ideas what I am doing wrong?

  • Without the declaration, but with the import in the UiBinder of gwtquery.plugins.droppable.client.gwt, I can successfully compile
  • I can successfully compile when making the declaration in MyView.java instead of UiBinder
  • I cannot compile when declaring any other DragAndDrop either, nor when declaring one in a different UiBinder

解决方案

I think I figured this one out. Any Widget used in UiBinder must have a zero-arg constructor...

DragAndDropCellTree does not have a zero-arg constructor. So it makes sense that I could declare in MyView.java but not MyView.ui.xml.

So this was a GWT <-> GwtQuery problem.

These are alternatives to still use UiBinder.

这篇关于GWT(2.7)在GWTP(1.5.1)项目中的UiBinder中声明GwtQuery(1.0.6)Widget时编译失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆