how to open a vaadin window when hovering over a label

Hey,

As described in the attached image I would like to create a grid with draggable rows.

When a row is dragged the user should be able to drag it on top of one of the alphabetical ordered labels which then opens a window. Inside the window are labels which then serve as drop endpoints. At the moment I’m struggling to realize this functionality.
The biggest issue for me is to open a window whcih I can fill with components when hovering over a label. Has anyone an idea how to achieve this?

34507.png

If it’s a standard Label, you can embed any HTML in it, which could be e.g. a tag with a JavaScript mouseover / mouseenter event handler. You can register a JavaScript function (see https://vaadin.com/docs/-/part/framework/advanced/advanced-javascript.html ) in your Java code and use that to open the Window.

-Olli

Thank you for pointing me into that direction =)

[i]

label.setValue("<span ondragover="myfunc(
)")> text
");

and



JavaScript.getCurrent().addFunction(“myfunc”,
new JavaScriptFunction() { @Override public void call(JsonArray arguments) …

did the trick.

[/i]

Nice :slight_smile: