Open gpallas16 opened 6 years ago
Conceptually, all the stuff should work for Vaadin 10, the only difference is the way you start Jetty (servlets and setup changed in V 10). I did not try this with V 10, so cannot say what is wrong with it.
Well after a lot of tries I have not managed to make it work. So I followed your tutorial here and your example app. Everything is working perfectly but I have (hopefully) one last question. I am currently executing java methods in javascript and vice versa but in some cases I want to pass arguments in the methods ie mainWindow.webContents.executeJavaScript("addText("+ jsonArray +");"); is something like that possible? Thank you for your time :)
Sure, its possible, see examples here https://github.com/jreznot/electron-java-app
FWIW, I have gotten it to run with Vaadin 10. What I did was use the Spring Boot Starter project from Vaadin, so I didn't have to worry about Jetty et. al. For the Electron part it really does not matter what you use, you can always write a startup.sh or startup.bat script to custom-launch your application and then launch that script from main.js.
@jreznot Now that Vaadin 14 (the next LTS) is out, maybe it makes the most sense to update to that instead of 10 or 12?
Yes, I've been waiting for 14 LTS release because there they finally support NPM packages for front-end. See https://github.com/jreznot/electron-java-app/issues/15
Hi. I like this technique and I am trying to implement it in my project but it seems Vaadin 10 doesn't work like that. Any tips or quick fix on how to do this with Vaadin 10?