jQuery and Vaadin 7

Hi,

I am currently experimenting with integrating a jQuery-plugin with Vaadin.

I created a Serverside-Component that loads both jquery-min.js and the plugin’s JS-File via @JavaScript. Those files are included in the head-section of the resulting HTML and are all fine. Then I have a client-side-widget for creation of the necessary bootstrap-HTML, which also does the jQuery-magic by calling $(“.myDiv”).pluginsFunction() in onAttach(). But this always fails with a ClientSideException “$ is not defined”. I also tried using “jQuery”, same result.

Any ideas anybody?

Hi,

If you are trying to access JQuery on the client-side through JSNI - then it should be available as $wnd.JQuery.

HTH
Aleksandr

Hi,

Take a look to GQuery (http://code.google.com/p/gwtquery/). It’s pretty cool.

Mauro.

Thank you, that works perfectly!