2010-09-21 1 views
0

Dans mon application développée en utilisant gwt2.1 en cliquant sur le bouton d'actualisation du navigateur mène à la page d'accueil et le jeton reste dans l'URL à cause de laquelle mes liens ne fonctionneront pas .. Par exemple. Supposons que mes liens sont link1, link2, link3 et # Link1, # lien2, # link3 sont des jetons respectifs .. cliquant maintenant sur link1 aura l'URL suivante http://localhost:8080/myproject/home.htm#link1GWT rafraîchir navigateur question

 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. 

Répondre

1

Êtes-vous firering l'état de l'histoire actuelle dans votre onModuleLoad -fonction de votre EntryClass?

Ajoutez juste

History.fireCurrentHistoryState(); 

de le faire.

+0

ya je le tire dans onModuleLoad funtion .. Mais la solution pour laquelle je cherche est: En cliquant sur rafraîchir le laisser aller à la page d'accueil mais l'URL devrait être http: // localhost: 8080/myproject/home.htm c'est-à-dire que le jeton devrait disparaître après rafraîchissement .. – java

+0

Désolé, j'ai mal compris. Avez-vous essayé History.newItem (""); dans votre onModuleLoad()? –