location of javascript files for integration


I’m trying to make use of some javascript libraries (mostly jQuery and jsPlumb) in a Vaadin application. I am trying to follow the procedures for javascript integration described in section 16.12 of the manual, but am having trouble getting off the ground. The main problem is that I just don’t know where in my project to put the javascript files (like mylibrary.js and mycomponent-connector.js in the example of 16.12). I am using the Eclipse plugin. There is some information on the web of how this would be done with maven, but the directory structure of an Eclipse project is different, and I am using Eclipse.

Thanks very much in advance.

Matthew Fleming

It looks like the javascript files want to be under Java Resources/src/package name. A bit counterintuitive?

Matthew Fleming

As you’ve seen, it depends how you have your project set up!

In my projects, it’s all in the same directory tree (I’ve configured my IDE and build scripts to simply copy the *.js files across when compiling) - and that makes life very simple (as well as keeping everything all together for a given component)

Essentially, the annotations basically mean “load the files relative to the class they are attached to via the classloader” - it’s up to you and your IDE config as to where the files actually live.




Have you succeeded on using jsplumb in Vaadin?
Could you help me getting started with jsplumb in vaadin?