gwt-history

GWT History Problem

孤街醉人 提交于 2020-01-05 04:36:32
问题 when i am adding a new history item like this History.newItem("Register"); the url correcly changes to http://127.0.0.1:8888/BiddingSystem.html?gwt.codesvr=127.0.0.1:9997#Register and loads the register form but then the url automatically rechanges to http://127.0.0.1:8888/BiddingSystem.html?gwt.codesvr=127.0.0.1:9997# why?? because I want to remain as http://127.0.0.1:8888/BiddingSystem.html?gwt.codesvr=127.0.0.1:9997#Register so that user can reload 回答1: The problem is that I was using an

GWT: How to suppress hyperlink so that it doesn't change my history token

南楼画角 提交于 2019-12-12 12:13:20
问题 I want to make my hyperlinks act like buttons (only respond to Click event) however, they change the history token automatically when you click on them, which messes up my history mechanism in my application. Is there a way to suppress the default behaviour of the hyperlink so it doesn't change the history token? I tried setting targetHistoryToken to null but it didn't work. Thanks, 回答1: Use Anchor instead. As java doc of Hyperlink says: If you want an HTML hyperlink ( tag) without

What is need History.fireCurrentHistoryState() in GWT History?

不羁的心 提交于 2019-12-01 06:54:48
问题 Hello I am working on a GWT sample history management application. Here is my onModuleLoad Code. public void onModuleLoad() { ContentPanel panel = ContentPanel.getInstance(); if(History.getToken()!=null && History.getToken().length()==0) { History.newItem("first_page"); } History.addValueChangeHandler(new HistoryHandler()); RootPanel.get().add(panel); History.fireCurrentHistoryState(); } In this I fired History.fireCurrentHistoryState(); to fire current state of history. Now In my firstPanel

How do I determine whether I am going “forward” or “backward” through my History in GWT?

醉酒当歌 提交于 2019-11-29 07:44:26
I am looking at History and History JavaDocs in GWT and I notice that there is no way to tell whether the forward or backward button was pressed (either pragmatically or by the user). The "button press" is handled by your registered addValueChangeHandler, but the only thing passed to the handler is a string on your history stack. There is no indication as to whether the "History" is moving "back" (using the back arrow button) or "forward" (using the right arrow button). Is there any way to determine this? Sorry, you can't. And even if you could, there are browsers, like Firefox, that let the

How do I determine whether I am going “forward” or “backward” through my History in GWT?

一世执手 提交于 2019-11-28 01:20:19
问题 I am looking at History and History JavaDocs in GWT and I notice that there is no way to tell whether the forward or backward button was pressed (either pragmatically or by the user). The "button press" is handled by your registered addValueChangeHandler, but the only thing passed to the handler is a string on your history stack. There is no indication as to whether the "History" is moving "back" (using the back arrow button) or "forward" (using the right arrow button). Is there any way to