GWT supports "pages" in an application through a fragment identifier (FI) URL, i.e. http://www.yourhost.vom/main#pagename , where "pagename" is the fragment identifier representing the "page" in your application.
These "pages" (note that the browser never reloads the page, so the GWT application remains the same), has full history support and bookmarking capabilities.
NOTE: the entire token of a GWT document sometimes mentions a place token or history marker.
Enable history support by adding an iframe to your home page:
<iframe src="javascript:''" id="__gwt_historyFrame" style="width:0;height:0;border:0"> </iframe>
Register a ValueChangeHandler to be notified when FI (page) changes: History.addValueChangeHandler(..) . Inside this handler, you put logic that displays a new page.
Go to a specific page by calling History.newItem("newpage") (without #)
You can even pass โparametersโ to the page by dividing the fragment identifier into parts: for example, โ# edit / user4โ. Just analyze this FI, call the code that shows the edit page and pass it "user4". You can use any character to separate FI into part "page" and "parameter" (I use here // here). To see this in real life: open a message in gmail and look at the URL.
source share