integrating javascript libraries

Hi folks,

I’m wondering if I’ve understood this correctly… basically I have pure JS projects, like
d3
which i’d like to dump into a Layout. So do I do the server side integration as decribed here: https://vaadin.com/book/vaadin7/-/page/gwt.javascript.html

(and then do the API integrations)

Or have I oversimplified it completely?

Thanks!

Hi,

The best method depends totally on what exactly you are about to do. In some cases just including the script on host page and using “getPage().getJavaScript().execute(“foo()”);” from server side might do the thing, but quite often you want to create “components” and have proper server side Java API for the javascript stuff. GWT wrappers are then the most powerfull tools, but your might then also do with “javascript component wrappers” as well.

cheers,
matti

Ok thanks so I didn’t misunderstand that page then.