0

I am trying to use dialogs with GWTQuery-UI in Kepler and can't figure out what is wrong. I followed as best I could the instructions found at https://code.google.com/p/gwtquery-ui/wiki/GettingStarted. I have the following code setup

gwt.xml

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

I have also tried the gwtquery.plugins.Ui but that hasn't solved things either.

In my java file I have the following

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

I have the following in the html for the project.

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

In the main logic I have the following click handler

@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.
    }
}

When I debug I get the error: Line 80: Referencing method 'com.google.gwt.query.client.Function.f(Lcom/google/gwt/user/client/Event;Ljava/lang/Object;)': unable to resolve method

When I step through the code x = 1; which is correct, but the .dialog() line fails with the error mentioned above.

When I try and compile it I get the following error

[ERROR] Errors in 'jar:file:/C:/src/gwtquery-ui-r146.jar!/gwtquery/plugins/ui/UiWidget.java' [ERROR] Line 80: Referencing method 'com.google.gwt.query.client.Function.f(Lcom/google/gwt/user/client/Event;Ljava/lang/Object;)': unable to resolve method

Any help would be appreciated. Yes I am new to GWT and just don't understand what I am missing.

Thanks.

1 Answers1

0

If you are using gwtquery 1.4.2, then it could be the issue. I resolved it by downgrading to gwtquery 1.3.3.

Rashid Shaikh
  • 395
  • 4
  • 12