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
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