Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

exchange Class beetwen GWT widget and Vaadin application

Simon Bos
1 decade ago May 13, 2011 4:24pm
Artur Signell
1 decade ago May 13, 2011 4:40pm
Artur Signell
1 decade ago May 13, 2011 5:36pm
Simon Bos
1 decade ago May 16, 2011 2:07pm
Henri Sara
1 decade ago May 19, 2011 9:36am

Simon Bos: I have some doubts. The class that represents the object to be exchanged must implement
Paintable? Also what does it mean that the class must
reside on the client? I tried to follow your advice and using Gson
and Json but when I insert the part that deserializes does not compile
Widget. Thanks

The class does not need to implement Paintable.

"Residing on the client" here means that it needs to be in a "client" package under the package that has the widgetset .gwt.xml file - or in a subpackage of "client". Otherwise, the GWT compiler will not find it. Probably also your widgetset compilation problem is caused by some classpath issues - note that the GWT compiler also needs the sources of all the code to be compiled to the client on its classpath.

If you are compiling the widgetset with the Eclipse plugin, you do not have full control over the GWT Compiler classpath - only classpath JARs that have GWT modules are used during the widgetset compilation. Therefore, you might need to use e.g. an ANT build script for building the widgetset instead of using the Eclipse plugin directly if you want to use non-Vaadin/GWT JARs in client side code.