Hi good forum people,
I have a running Vaadin based application that I have received a feature request on: Allow bookmarks.
I have two places where I need to be able to set bookmarks, one is a view of a particular registered user. The other is on the search.
Currently, the URL just reads http://host/appname/ for all parts of the application. This needs to change, and looking at the other threads in the forum on how to do this, it seems I’m going to have URLs that look like this:
http://host/appname/#search/search=“searchstring”/searchparam1=“5,C++”
For the user, I don’t care much about how the URL looks, as there is a single ID for each user and that’s not hidden. So anything that can say “show user number 127” is good.
For the search, it’s a bit more difficult. I have a general search string as well as any number of <skill level, skill name>. I don’t care how the URL looks, but I need it to be able to give me those things.
I need two things:
-
How to set the URL in the browser, so the user can copy and mail the links, and bookmark them.
-
How to get the URL when the user uses the bookmark or the mailed link.
I looked at the thread in this forum that did involve something similar, but didn’t find the answer in it. I also tried to find the sampler source code, but could only find the source to the individual samples, and they have no URL control.
The perfect solution for me would be to find a way where I don’t actually change the application flow. That means only setting the URL in the browser, not actually using it. And when the user does make a HTTP request with the full URL, only then use the URL to navigate to the page.
I hope someone can help here. And not only by pointing to the window discussion, because I have already read that without figuring out how to do this.
Thank you,
Bo Thorsen,
Monty Program AB.