GWT历史问题

GWT历史问题,gwt,browser,state,token,gwt-history,Gwt,Browser,State,Token,Gwt History,是否可以从每个类添加/创建新的历史标记?我有一个问题,如果我试图在主类(主类包含onModuleLoad()方法)之外创建新的令牌(History.newItem(“infoTab”)),就会得到NullPointerException。此处显示错误消息: 09:45:11.890 [ERROR] [com.mycompany.client.AdminInterface] Unable to load module entry point class com.mycompany.client.e

是否可以从每个类添加/创建新的历史标记?我有一个问题,如果我试图在主类(主类包含onModuleLoad()方法)之外创建新的令牌(
History.newItem(“infoTab”)
),就会得到NullPointerException。此处显示错误消息:

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)
编辑:未在index.html中添加iframe部分。添加后,我得到以下结果:

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: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)

所以我真的不明白怎么回事……没有iframe,我成功地添加了五个历史标记,如下所示。

在我的index.html中使用和不使用iframe标记都有效。我的错误是,我使用了错误的url查询参数…在#::之后)

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