Convert POJO -> JSON in rap 2.0 [message #1038259] |
Wed, 10 April 2013 12:28  |
Eclipse User |
|
|
|
Hi, in my rap 2.0 used custom widget.
RemoteObject remoteClientObject;
private MyJson myJson = new MyJson();
Connection connection = RWT.getUISession().getConnection();
remoteClientObject = connection.createRemoteObject("rap.MyObject");
remoteClientObject.set("parent", WidgetUtil.getId(this));
remoteClientObject.set("text", "myText");
remoteClientObject.set("datee", myJson);
and when custom widget is opened we have error
Parameter object can not be converted to JSON value: xxx.MyJson@73986b
without remoteClientObject.set("datee", myJson) it's work correctly
MyJson:
class MyJson implements Serializable{
private static final long serialVersionUID = 2769033938543409463L;
public MyJson() {}
private int foo;
public void setFoo(int foo) {
this.foo = foo;
}
public int getFoo() {
return foo;
}
}
Please, where is problem?
Thanks, Anatoliy
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.14365 seconds