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?.

Mayank Pandya
  • 1,593
  • 2
  • 17
  • 40

1 Answers1

0

Sounds like problem with your implements IsSerializable I suspect your class not implement com.google.gwt.user.client.rpc.IsSerializable.

It should implements either java.io.Serializable or GWT com.google.gwt.user.client.rpc.IsSerializable.(No problem with both together).

And about your default constructor .It should an empty constructor. e.g

 public ModelDto() {

}

Most of the problems raises with these two points only if you still facing the issue after made the above changes like package structures...etc please refer this.

Community
  • 1
  • 1
Suresh Atta
  • 120,458
  • 37
  • 198
  • 307