是否可以从每个类添加/创建新的历史记录令牌?我有问题,如果我尝试在主类之外创建新标记(History.newItem("infoTab")
)(主类包含onModuleLoad()方法),我会得到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)
MainEntry的第110行是:
searchButton = new Hyperlink("Search", SEARCH_ID);
所以我无法理解,出现了什么问题......如果没有iframe,我会成功添加五个历史令牌,如下所示http://localhost:8080/client/index.html#token1。
答案 0 :(得分:0)
在index.html中使用和不使用iframe标记。我的错误是,我使用了url查询参数错误...在#:)
之后