Reputation: 3587
I am using GWT 2.3 with GWTP plugin in my application.In this application I want to block browser back and forth event.For this I got some java script code.But this code is onLoad() and onUnLoad() of the html page.As application is a GWT application there is only one html which myapplication.html.So it is loaded only one time rest history token fire depends upon code. I want to block browser event for each and every history token in the system.
Scenario is like below:
My first history token is index.So first my index page is loaded.Now there is login panel on index page.After success full login I fire another history token named userpage.So my user page is loaded.On back click a history token index is fired again my index page loaded again.And now If I click on forth of browser then again my user page is loaded.
So for back I don't want to fire last history token again and same for the forth not next history token. If history token would fired from code instead of browser event (back and forth) then it should work in proper manner.So just want to handle browser event.
For handling history I also overridden method on value change.So my every history token is went to on Value change but I am not able to identify, that the history token is fired is from browser event or from code.
Please help me out. Thanks in advance.
Upvotes: 0
Views: 1178
Reputation: 64541
Short answer: don't do it, that's not how the Web works.
Longer answer already given on the Google Group: https://groups.google.com/d/msg/google-web-toolkit/ek5cGCJ7-ug/HJEC2HTgT-AJ
Upvotes: 2