URI handling and generation

Hi there,

My application screen is split between a navigation tree and a content panel. Upon selection of a tree item, the main panel content changes to the relevant panel.
I would like these panels to correspond to different URIs, in order to have them bookmarkable and be able to use the back button.

e.g. http://localhost:8080/MyApp/TreeItem1, http://localhost:8080/MyApp/TreeItem2, etc.

There are two classes that seem to be of help in this: URIHandler and URIUtility

What are these ? How do they collaborate/differentiate ? Is there an example of such a thing in the incubator ?

Many thanks in advance,


Hi Damien,

you can use URIFragmentUtility, see the Sampler demo as a reference -it uses the same technique. Your bookmarkable URI’s will look like then:

In short words, add an URIFragmentUtility into your Window or layout instance (it is invisible component), then register an URI change listener in this utility - when URI is changed, your listener will get an event. You can also force changing an URI form inside your application by invoking an appropriate method of URIFragmentUtility instance.


I had it working after a few attempts,

Thanks Dmitri