Making Contents table for a GWT page. similar to one wikipedia has
How to make Contents table for a GWT page, for the purpose of bookmarking and direct jump to a subsection of a dynamic page.
Address for my webApplication is like,
www.example.com/WebApp#param1=value1¶m2=value2This link displays a page with many subsections, i want to provide feature for users to be able to bookmark and load subsect开发者_如何学Pythonions directly.
You can use the History class to get access to the URL after the #
and react accordingly. It works really well, and is the officially recommended way of solving this problem.
A short tutorial: http://www.bluecoders.com/tutorials/gwthistory.html
Basically, History
is a static class on which you can call addValueChangeHandler
to register an object that should deal with any history changes. This supports direct linking (e.g. bookmarks) and also proper navigation when the user uses the back and forward buttons in the browser.
精彩评论