0

Does GWT provide any way to define click handlers for when the user clicks the back/forward browser buttons? If so, how could I define such handlers? If not, why?

IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756

2 Answers2

2

No, You cannot do that with GWT. However, you may use the History Token to manage the URL changes

dhamibirendra
  • 3,016
  • 23
  • 26
  • Thanks @dhamibirendra (+1) - is it possible to do in JSNI/pure JavaScript? Why isn't it possible to do in GWT (and do you have any links to GWT docs that confirms this)? Thanks again! – IAmYourFaja Jan 04 '14 at 15:25
  • 1
    search and found an older SO question http://stackoverflow.com/questions/2693527/how-do-i-determine-whether-i-am-going-forward-or-backward-through-my-history?rq=1 – dhamibirendra Jan 04 '14 at 15:36
0

take a look here GWT MVP they explain very well how to implement a such behavior ( using History tokens). hope it helps.

timmz
  • 2,194
  • 3
  • 23
  • 29