0

I have two different model class,

public class ModelDto implements IsSerializable{
     public ModelDto {}
     private Integer id;
     private String name;
     private ArrayList<Test> name;
}

public class Test implements IsSerializable{
     public Test {}
     private Integer id;
     private String name;
     private ArrayList<Test> name;
}

I want to make a RPC call like

ModelDto getModel();

How to achieve this? I know that the issue is basic serialization. but I want to know that how to pass a ArrayList in RPC If not posible any alternatives?.


How do I check for Internet connection or load local file?

I have an app which, from the app delegate, calls a synchronization engine. The synchronization engine fetches data from the web from a web service parses it and puts it in a core data base.

The individual you controllers call a fetch to the core database in order to present the data.

I want to add the feature of checking for Internet connectivity. Should I check for Internet connectivity in the app delegate and if there is one call the sync engine, else if there is not... What do I do, just leave it empty?

If (Internet) {
//call sync engine
} else { 
//do nothing
}
4

1 回答 1

0

听起来你的问题implements IsSerializable我怀疑你的课程没有实现com.google.gwt.user.client.rpc.IsSerializable.

它应该实现一个java.io.Serializable或 GWT com.google.gwt.user.client.rpc.IsSerializable.(两者一起没有问题)。

关于你的默认构造函数。它应该是一个empty constructor. 例如

 public ModelDto() {

}

package structures仅当您在进行上述更改(如...等)后仍然面临问题时,才会出现这两点的大多数问题,请参阅

于 2013-03-06T05:16:50.600 回答