views:

136

answers:

2

Ajax applications, and GWT in particular, use the URL fragment (e.g. http://example.com/myapp#fragment) to maintain application state on the client without reloading the page.

Is there a GWT library that facilitates the encoding and decoding of arbitrary parameters into the URL fragment? I'm looking for something analogous to the Servlet API's getParameter() method, but for client-side URL parameters.

+2  A: 

You may want to investigate gwt-platform, it includes features for reading/modifying parameters in the fragment, as well as a ton of other great MVP features, like EventBus, Presenters, even easier async loading of JS, etc. It looks pretty awesome.

Specifically, check out the "Using URL parameters" section of this guide.

Jason Hall
Since we're talking about URL fragments, I'll note that http://code.google.com/p/gwt-platform/wiki/GettingStarted#Using_URL_parameters is the link to the section you mentioned. ;)
aem
A: 

If we talk about gwt-platform there is another very good framework called mvp4g. The goal of the Mvp4g framework is to help you build GWT applications easily, following best practices shown by Ray Ryan at the Google I/O:

Event Bus Dependency Injection Model View Presenter Place Service

It also includes HistoryConverter that makes url parameters easy to use.

kospiotr