我試圖用GWT-Platform做點什麼,但是,下面的示例在這個頁面中:http://code.google.com/p/gwt-platform/wiki/GettingStarted?tm=6簡單不起作用。GWT-Pratform的問題PlaceManager +杜松子酒
我得到了以下錯誤:
java.lang.AssertionError: Internal error, PlaceRequest passed to updateHistory doesn't match the tail of the place hierarchy. at com.gwtplatform.mvp.client.proxy.PlaceManagerImpl.updateHistory(PlaceManagerImpl.java:489) at com.gwtplatform.mvp.client.proxy.ProxyPlaceAbstract$3$1.execute(ProxyPlaceAbstract.java:208) at com.google.gwt.core.client.impl.SchedulerImpl$Task$.executeScheduled$(SchedulerImpl.java:50) at com.google.gwt.core.client.impl.SchedulerImpl.runScheduledTasks(SchedulerImpl.java:228) at com.google.gwt.core.client.impl.SchedulerImpl.flushPostEventPumpCommands(SchedulerImpl.java:388) at com.google.gwt.core.client.impl.SchedulerImpl$Flusher.execute(SchedulerImpl.java:78) at com.google.gwt.core.client.impl.SchedulerImpl.execute(SchedulerImpl.java:138) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213) at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363) at java.lang.Thread.run(Unknown Source)
當我試圖做一個PlaceRequest。
我猜這是因爲注入了PlaceManager,而且有些時候它並不是單身人士,而是遵循wiki(http://code.google.com/p/gwt-platform/wiki/GettingStarted? TM = 6#Binding_everything_together):
Installing DefaultModule saves you from having to perform all the following bindings: bind(EventBus.class).to(SimpleEventBus.class).in(Singleton.class); bind(TokenFormatter.class).to(ParameterTokenFormatter.class).in(Singleton.class); bind(RootPresenter.class).asEagerSingleton(); bind(PlaceManager.class).to(MyPlaceManager.class).in(Singleton.class); bind(GoogleAnalytics.class).to(GoogleAnalyticsImpl.class).in(Singleton.class);
地方經理已經是一個單身......但是,它只是不工作。
有人有這個問題嗎?
我試圖讓它去m#!home to#!adduser,但是,我認爲我做了一些錯誤的事情,下面的示例使用嵌套的演示程序。 – caarlos0
然後,您不應該調用updateHistory(),而是嘗試使用revealPlace()。 –
我使用的是揭幕(新的PlaceRequest(NameTokens.addUser))... – caarlos0