質問

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.

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top