URL parameter #7

bendupont opened this Issue Apr 23, 2012 · 6 comments

4 participants


It would be very handy to be able to specify parameters to the opened url. For example, adding a "#anchor" to the following url to open directly a specific section : http://localhost:2173/#anchor.

For example you could add a new property in the configuration file like "url_parameters" which is concatenated to the base url, and it should be possible to add it as a program argument also

BSB Labs member

How would that fit in the api ? I don't think urlParameters is a good name for what you want


Given an URL like this one : http://localhost:1234/some/path/?debug#anchor

How about something like openBrowserTo("/some/path/?debug#anchor") instead of openBrowser(true).

BSB Labs member

Thanks for the feedback. I thought about that one as well (nice suggestion with the openBrowserTo by the way!) but the problem I have with this is that so far users do not have to care about the context root. With your suggestion, they have to now.

Suppose a properties file overrides the default context to /myapp. You need to take that into account in your config. And since this feature is to open the browser on the application (and nothing else), I would have expected a relative path to work. Maybe we can do both by checking if the parameter starts with a / or not.


  • "?debug#anchor" would add a relative location to the generated deployUrl (http://localhost:[port]/?debug#anchor)
  • "/myapp?debug#anchor" would create an absolute location based (http://localhost:[port]/myapp?debug#anchor)



Sounds good to me! It's the same semantics as a link in html (href="?debug" href="/blub?debug"). If you want to push that further, should also completely absolute urls be allowed, like .openBrowserTo("http://...")? That would be consistent, and might be useful when your Vaadin app is embedded into another site (e.g. a portal).

BSB Labs member

sounds like we have enough information to go further on that one.

I would maybe use openBrowserAt instead of openBrowerTo

Thanks everyone!

@snicoll snicoll was assigned Apr 28, 2012
BSB Labs member

and this is now implemented.

@snicoll snicoll closed this Apr 28, 2012
@snicoll snicoll added a commit that referenced this issue Apr 28, 2012
@snicoll snicoll #7 documentation 0681134
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment