gwt: creating an instance of Window causes application to hang out

谁说我不能喝 提交于 2019-12-11 17:37:52

问题


Inside a legacy application, i am creating a new class MyForm, and modify the existing class MyPanel by adding a reference to MyForm:

import com.smartgwt.client.widgets.layout.VLayout;

public class MyPanel extends VLayout 
{
    public static MyForm myForm = null;

    public MyPanel() {
        myForm = new MyForm();//the line causing trouble
    }
}

and:

public class MyForm extends com.smartgwt.client.widgets.Window 
{

  private static TextItem myTextItem;

  public MyForm()
  {
   //other lines of code
    myTextItem.setValue("some value");
   }
}

When commenting the initialization of MyForm, the application works as it did before; when i uncomment this line, the application hangs out. The main page of the application is loading forever.

There are no compiler warnings displayed in my IDE (Eclipse), also no error logs/stack trace appear in the log files of the server (Apache Tomcat).

However, the browser console displays the following warning:

*11:55:42.978:WARN:Log:Uncaught exception escaped: com.google.gwt.core.client.JavaScriptException (TypeError) : Cannot read property 'oq' of null at new JEb(ra-0.js) at xHb(ra-0.js) at new EHb(ra-0.js) at iFb(ra-0.js) at UFb(ra-0.js) at XFb(ra-0.js) at aA(ra-0.js) at nd(ra-0.js) at Id(ra-0.js) at eval(ra-0.js) at Gb(ra-0.js) at Jb(ra-0.js) at eval(ra-0.js)

GWT version: 2.8.0 Tomcat version: 8.0

来源:https://stackoverflow.com/questions/49985693/gwt-creating-an-instance-of-window-causes-application-to-hang-out

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!