Reputation: 57
I'm creating my first Vaadin Project and I have lots of problems understanding how it works. I created a new widget, that uses GWT Graphics and I drew some objects on the screen. However sometimes, instead of displaying the DrawingArea, my browser shows me this error
Widgetset 'com.example.jtpwebapp.JtpwebappWidgetset' does not contain implementation for com.example.jtpwebapp.MyComponent. Check its component connector's @Connect mapping, widgetsets GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions.
The other components are just fine. For example, this error shows up if I simply create a new Thread
new Thread() {
public void run() {}
}.start();
The widgetset re-compilation gives me no errors. I'm not changing the @Connect mapping nor editing the module file. There is really not much code to share, I created a new Vaadin widget using the Eclipse plugin and edited only in a few places.
I get this error also, when I try to make my widget implement a ClickHandler.
Upvotes: 0
Views: 538
Reputation: 1035
GWT only contains an emulated subset of the Java runtime environment. Thread is one of the classes that's not included; JavaScript doesn't support threading so there's no way for the GWT compiler to generate the code for it. The full reference of what's supported is available here.
Now, missing emulation does unfortunately not show up at compile-time, but GWT does perform checks against the JRE emulation library. You just have to run your app in developer mode. The Debugging Client-Side Code section in Book of Vaadin does a pretty good job at explaining how to achieve that with Vaadin.
Upvotes: 1