how to open vaadin subwindow from label content xhtml link?

I want to create a link in a label’s xhtml content that calls an event listener or method that opens a vaadin subwindow.
Anyone knows how?

That may not be easy. You could put some JavaScript in the link to change the values of some Vaadin component, such as a text field or a button. See
here
. It’s a bit tricky though.

The easier way is to use a CustomLayout instead and use a Vaadin button marked with a location div.

Thank you. The first looks too complicated.
The CustomLayout looks just fine for providing a wiki reference system to my application Help, however it means I must create a cache of these
layouts and load them at applications start, because again loading them dynamically would create too much overhead.

I needed is a way for appfoundation to compile internationalized elements inside other internationalized elements (something in the way Facelets work) for starters, when loading them into the static fields, because using parameters there’s a lot of dynamic loading overhead

I appreciate this post is some 3 years late, but in the event that anyone else reading the post with a similar question, may find this useful.

I have a similar requirement, you can find an answer in the “Book of Vaadin” have a look at
this section
.

The basic idea is that sub windows (Application Windows) are accessed via a URL like <$WEBCONTEXT>//.

So if you App URL is http://localhost:8080/MyApp and you want a window to open when you click a link in the Label (must be XHTML style), this will make a call like this:

http://localhost:8080/MyApp/myWindow

You also need to override getWindow(String) in your application.

For me, this does what I want, but I’d rather the page did not refresh completely to pop up a window.

If you can live with that, then it’s a pretty simple way of getting what you want.