Oh...and a class can also be added to the serialization policy if it is declared as a field of another class which is part of the serialization policy. So for example, if class A is a return type from an RPC method and class A has a field declared as class B, then both class A and B will be allowed to be serialized by the serialization policy.
Where it gets tricky is when you have class A that declares a collection of objects as a field and you place an object of class B in that collection. In this case, the serialization policy might not allow class B to be serialized. When you declare collections, you must specify the type of collection. So ArrayList<Object> would not work, but ArrayList<B> would work. I've found you have to be as specific as possible when delaring your RPC methods and serializable class fields. Hope this helps. -Greg On Nov 7, 10:20 pm, Greg <[EMAIL PROTECTED]> wrote: > In order for a class to be added to the serialization policy, the > class must be either a parameter to an RPC method, or a return type > from an RPC method. There are a couple excpetions to this, but that's > the general rule. In your RPC interface, does the type > LatitudeLongitude appear in any of your method declarations? > > -Greg > > On Nov 7, 1:23 am, Joshua Partogi <[EMAIL PROTECTED]> wrote: > > > > > Dear all, > > > I encounter this problem: > > > Caused by: com.google.gwt.user.client.rpc.SerializationException: Type > > 'lab.gwt. > > client.LatitudeLongitude' was not included in the set of types which > > can be seri > > alized by this SerializationPolicy or its Class object could not be > > loaded. For > > security purposes, this type will not be serialized. > > > When passing an object with GWT RPC. This class is already > > implementing Serializable. But why does such problem still occur? > > > Does anyone know how to fix this? > > > Thank you in advance.- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
