@JavaScript Annotation issue

Hi,

I’m trying to use jQuery with Vaadin 7.

import com.vaadin.annotations.AutoGenerated;

@JavaScript({“jquery-ui.min.js”})
public class MainView extends CustomComponent implements View {…

However, I’m getting this warning in Eclipse:
“Type mismatch: cannot convert from JavaScript to Annotation”, regarding the @JavaScript({“jquery-ui.min.js”}) notation.

I tried to find a solution on the web. Why is Eclipse complaining like this?

thank you

What is the full path in your import? Make sure you have the one in com.vaadin.annotations

Hi,

seems there was another import I had overlooked.

import com.vaadin.
ui.
JavaScript;
instead of:
import com.vaadin.annotations.JavaScript;

So I exchanged the two and now it seems ok. Thank you, Marcus.
Having both the imports causes a collision between the two.