1

when i am adding a new history item like this

History.newItem("Register");

the url correcly changes to

http://127.0.0.1:8888/BiddingSystem.html?gwt.codesvr=127.0.0.1:9997#Register

and loads the register form

but then the url automatically rechanges to

http://127.0.0.1:8888/BiddingSystem.html?gwt.codesvr=127.0.0.1:9997#

why??

because I want to remain as

http://127.0.0.1:8888/BiddingSystem.html?gwt.codesvr=127.0.0.1:9997#Register

so that user can reload

kapandron
  • 3,546
  • 2
  • 25
  • 38
Noor
  • 19,638
  • 38
  • 136
  • 254

2 Answers2

2

The problem is that I was using an hyperlink for acting like a click handler. with a hyperlink, event if u place an empty string, it gonna change the url.

e.g. if the current URL is something like http:...//#This and a hyperlink has an empty target history token then, the url is to change to http:...//#.

The solution i used that worked for me is that because i does not want to use a button, i make use of label and adding some css to it to make it look like a hyperlink

for e.g.

Label Register= new Label("register");
Label.setStyleName("FalseHyperlink");

then in the css

.FalseHyperlink
{
   color:blue;
}

.FalseHyperlink:hover
{
   text-decortion:underline;
}

Here this solution worked for me because i was not interested in other hyperlink services such as visited or others

Noor
  • 19,638
  • 38
  • 136
  • 254
0

Check if any empty string added to History after page rendered or correct history token added to history? URL is changed when a string added to History.

Yusuf K.
  • 4,195
  • 1
  • 33
  • 69