tags:

views:

30

answers:

1

In my application developed using gwt2.1 clicking on browser's refresh button leads to home page and the token still remains in the url because of which my links won't work.. E.g. Suppose my links are link1,link2,link3, and #link1,#link2,#link3 are respective tokens.. Now clicking on link1 will have following url 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.
A: 

Are you firering the current history state in your onModuleLoad-function of your EntryClass?

Just add

History.fireCurrentHistoryState();

to do so.

Chris Boesing
ya i am firing it in onModuleLoad funtion.. But the solution for which i am searching is : On clicking refresh let it go to home page but the url should be http://localhost:8080/myproject/home.htm i.e.. the token should disappear after refreshing..
java
Sorry, I missunderstood that. Have you tried History.newItem(""); in your onModuleLoad()?
Chris Boesing