I want to pass an object from the server to the client with Vaadin:
My object:
public class MyObject {
public String name;
public int value;
}
Then I have a component extending AbstractJavaScriptComponent
, which has this:
public void doStuff(MyObject obj) {
callFunction("doStuff", obj);
}
The JavaScript function doStuff
is then correctly called, but the argument I get doesn't have the properties name
and value
, the type of the argument is correct (MyObject
).
MyObject
is part of the WidgetSet (it is in the *.client namespace), though I don't know if that is even a must..
What's going wrong?