开发者

GWT and Vaadin - variable is not a constructor stack

I have a strange error that I cannot make heads or tails of. A snippet of the error is below:

(TypeError): $wnd.EGeoXml is not a constructor stack: $jsInit([object Object],[object Object],null)

The actual lines of code is in GWT and looks like this:

privat开发者_如何学Ce native void jsInit(JavaScriptObject map, String kmlFile) /*-{
        var exml = new $wnd.EGeoXml("exml", map, kmlFile, {});
        this.@com.example.client.EGeoXmlJava::ready(Lcom/google/gwt/core/client/JavaScriptObject;)(exml);
    }-*/;

This code actually works when running as its own GWT project but when using this code with Vaadin, I get the constructor stack error. I'm positive the constructor exists. What I do not understand is why GWT thinks it's not a constructor? Thanks in advance.


You are calling it like new $wnd.EGeoXml(). The $wnd part looks bit weird to me. Is it necessary?

Anyway, if it is a problem only in Vaadin project, you might want check that the code resides in the right package. Remember that GWT wants the code to be in a package called .client. The server-side classes of Vaadin can be anywhere.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜