Don't you also need to do:

class POJO extends Serializable ?

I got many alerts about this in my classes.

On Tue, Jul 21, 2009 at 3:51 PM, Juraj Vitko <juraj.vi...@gmail.com> wrote:

>
> I'm trying to RPC-send an interface member in a POJO - all types
> implementing this interface are Enums (see the example below please).
>
> Now, the application works 100% in both hosted and web modes, but the
> Java to JavaScript compiler complains about the POJO object, that the
> MyIFace is not RPC-serializable. ("was not serializable and has no
> concrete serializable subtypes")
>
> Any ideas how to get rid of that compiler warning? I'm using GWT 1.6
> for the time being.
>
>
> class POJO {  //this object is sent via the RPC
>  MyIface iface;
> }
>
> interface MyIface extends IsSerializable {
>  MyIface[] getVals(String param);
> }
>
> enum MyEnum implements MyIface {
>   one("1"),
>   two("2");
>
>   private MyEnum(String s) { this.s = s; }
>   private MyEnum() { }
>
>   private String s;
>
>   MyIface[] getVals(String param) {
>      return MyEnum.values();
>   }
> }
> >
>


-- 
Quer aprender a programar? acompanhe:
Wants to learn GWT? Follow this blog ->

http://tcninja.blogspot.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to