在我使用gwt2.1开发的应用程序中,单击浏览器的刷新按钮会导致主页,并且令牌仍然保留在URL中,因为我的链接无效。 例如。假设我的链接是link1,link2,link3和#link1,#link2,#link3分别是各种标记..现在点击link1会有以下网址http://localhost:8080/myproject/home.htm#link1
Clicking on link2 will have following url http;//localhost:8080/myproject/home.htm#link2 and so on for other links.
Now the problem is : Suppose i click on link1 so my url will be http://localhost:8080/myproject/home.htm#link1 now when i click browser's refresh button it leads me to home page and my url will be still http://localhost:8080/myproject/home.htm#link1 i.e. the token still remains in the url because of which this link doesn't when clicked after refresh.
答案 0 :(得分:1)
您是否在EntryClass的onModuleLoad函数中触发当前的历史状态?
添加
History.fireCurrentHistoryState();
这样做。