I am using the GWT Hyperlink for click handling. I set the history token to empty string and i am adding a click handler to the hyperlink. Later I realised though when i am clicking on the hyperlink, it is changing the browser url after the ...#.
Is it possible to prevent a gwt hyperlin开发者_运维技巧k from changing the browser url?
This is hyperlink as you said. So this is for URL changes but you could set History token to empty string after each page loaded, Hyperlink changes to URL but your page changes it immediately to "..#".
I think you try to do this with clickhandler, maybe your clickhandler run before URL changed.
In this scenario you will meet your previous issue described in post; GWT History Problem
I've got i think a better solution, as soon as the current composit or class loads, just get hyperlink and set it to the current history token because if a hyperlink fire a history as same as the current one, no change will happen so
ReqHyperlink.getHistoryToken(History.getToken());
Since Token will the same, value change handler will no fire any event
精彩评论