【问题标题】:GWTQuery UI Error with .dialog().dialog() 的 GWTQuery UI 错误
【发布时间】:2014-06-19 22:05:18
【问题描述】:

我正在尝试在 Kepler 中使用带有 GWTQuery-UI 的对话框,但无法找出问题所在。我尽我所能遵循https://code.google.com/p/gwtquery-ui/wiki/GettingStarted 的说明。我有以下代码设置

gwt.xml

    <inherits name='gwtquery.plugins.UiGoogleCdn' />  
    <inherits name='gwtquery.plugins.UiEmbedded' />

我也尝试过 gwtquery.plugins.Ui 但这也没有解决问题。

在我的 java 文件中,我有以下内容

import static com.google.gwt.query.client.GQuery.*;
import static gwtquery.plugins.ui.Ui.Ui;
import com.google.gwt.query.client.Function;

我在项目的 html 中有以下内容。

<div style="display: none;" class="gwt-DlgBox">This is a test to see if this shows up</div>

在主逻辑中,我有以下点击处理程序

@UiHandler("btnShow")
public void btnShow(ClickEvent event)
{
        int x = 0;
    try
    {
            x = $(".gwt-DlgBox").length();
        $(".gwt-DlgBox").as(Ui).dialog();
    }
    catch(Throwable e)
    {
        e=e;  // just so I can debug break here.
    }
}

调试时出现错误:第 80 行:引用方法 'com.google.gwt.query.client.Function.f(Lcom/google/gwt/user/client/Event;Ljava/lang/Object;) ': 无法解析方法

当我单步执行代码时 x = 1;这是正确的,但 .dialog() 行因上述错误而失败。

当我尝试编译它时,我收到以下错误

[错误] 'jar:file:/C:/src/gwtquery-ui-r146.jar!/gwtquery/plugins/ui/UiWidget.java' 中的错误 [错误] 第 80 行:引用方法 'com.google.gwt.query.client.Function.f(Lcom/google/gwt/user/client/Event;Ljava/lang/Object;)':无法解析方法

任何帮助将不胜感激。是的,我是 GWT 的新手,只是不明白我缺少什么。

谢谢。

【问题讨论】:

    标签: java eclipse gwt gwtquery


    【解决方案1】:

    如果您使用的是 gwtquery 1.4.2,则可能是问题所在。我通过降级到 gwtquery 1.3.3 解决了这个问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-08-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多