Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 1 month ago
Interacting with JS Component (Drag and Drop)
Hi,
I am looking for your estimation whether the following is possible or if it is more advisable to look for another solution:
- Given a JS framework for creating specialized diagrams which has not yet been wrapped/integrated with vaadin
- I want to interact with the vaadin environment, e.g. have a vaadin-element, drag it and drop it onto a diagram created by the JS framework
- Based on the drop event, I trigger something in the JS world
- When the user clicks onto an element of the diagram (i.e. on a JS element), I want to trigger something in the Java world
Is this scenario, especially the drag and drop functionality, possible?
Last updated on
- Depends on the JS Framework but why not...Pretty much every Framework should work.
- You could use the Standard Vaadin DragAndDropWrapper. This way you don't have to do something custom and the functionality it brings could be enough like basic dragging and Drop Handling
- In the Drop event you could call a method of your Server-side component class which then executes a Client RPC to your JS client side
- This could be done by a ServerRPC
Check the vaadin wiki for information on any of the above: https://vaadin.com/wiki
Last updated on
Thanks for your answer and the references! I will have a look at them.
Last updated on
You cannot reply to this thread.