Transportable type requestfactory

88 views Asked by At

I'm developing an aplication with gwt and RequestFactory and I have a class that's something like this:

public MyClass{

private String someString;
private Object someObject;

public MyClass(){}

//Getters and Setters

}

Obviously if I make this an ValueProxy I'm unable to declare someObject as object because it isn't a RequestFactory transportable type. My question is: Can I declare it as an generic transportable type? How can I do that?

Thank you in advance.

1

There are 1 answers

0
Ümit On BEST ANSWER

Why do you use an Object ? If you need a "dynamic object" I would recommend to jsonify it and store the output as a String value.

On the client you can de-serialize it and use JsonObject, etc to access the properties.