开发者

Making Contents table for a GWT page. similar to one wikipedia has

开发者 https://www.devze.com 2023-01-26 03:52 出处:网络
How to make Contents table for a GWT page, for the purpose of bookmarking and direct jump to a subsection of a dynamic page.

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&param2=value2

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

0

精彩评论

暂无评论...
验证码 换一张
取 消