开发者

GWT History issue

Is it possible to add/create new history token from every class? I have the problem, that i get NullPointerException if i try to create new token (History.newItem("infoTab")) outside the main class (the main class contains the onModuleLoad() method). Here the error message:

09:45:11.890 [ERROR] [com.mycompany.client.AdminInterface] Unable to load module entry
point class com.mycompany.client.entries.MainEntry (see associated exception for details)

edit: the iframe part was not added in the index.html. After adding it, i get following:

11:16:48.885 [ERROR] [com.mycompany.client.AdminInterface] Error while executing the JavaScript provider for property 'user.agent'

com.google.gwt.core.client.JavaScriptException: (null): null
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:195)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java开发者_JAVA技巧:507)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
    at com.google.gwt.dev.shell.ModuleSpacePropertyOracle.computePropertyValue(ModuleSpacePropertyOracle.java:189)
    at com.google.gwt.dev.shell.ModuleSpacePropertyOracle.getSelectionProperty(ModuleSpacePropertyOracle.java:127)
    at com.google.gwt.dev.cfg.ConditionWhenPropertyIs.doEval(ConditionWhenPropertyIs.java:58)
    at com.google.gwt.dev.cfg.Condition.isTrue(Condition.java:49)
    at com.google.gwt.dev.cfg.ConditionAny.doEval(ConditionAny.java:37)
    at com.google.gwt.dev.cfg.Condition.isTrue(Condition.java:49)
    at com.google.gwt.dev.cfg.ConditionAll.doEval(ConditionAll.java:38)
    at com.google.gwt.dev.cfg.Condition.isTrue(Condition.java:49)
    at com.google.gwt.dev.cfg.Rule.isApplicable(Rule.java:36)
    at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.tryRebind(StandardRebindOracle.java:98)
    at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:54)
    at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:154)
    at com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:119)
    at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:531)
    at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:414)
    at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:39)
    at com.google.gwt.core.client.GWT.create(GWT.java:98)
    at com.google.gwt.user.client.ui.Hyperlink.<clinit>(Hyperlink.java:65)
    at com.mycompany.client.entries.MainEntry.onModuleLoad(MainEntry.java:110)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:369)
    at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:185)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:380)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
    at java.lang.Thread.run(Thread.java:662)

Line 110 from MainEntry is:

searchButton = new Hyperlink("Search", SEARCH_ID);

so i can't really understand, what is wrong...whithout the iframe i get five history tokens added successfully as follow http://localhost:8080/client/index.html#token1.


It works with and without the iframe tag in my index.html. My mistake was, that i use the url query parameters wrong...after the # :)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜