The code seems fine. Just make sure that your server code matches the client 
code and it should work. Really seems like a cache problem (clear browser 
cache, clear project, restart development mode, redeploy the application if 
you use an external server).


> I don't know if you already know it, but try to avoid using general 
> > interfaces in your RPC method signature (e.g. List) because GWT has to 
> > generate code for every possible implementation of these interfaces 
> (because 
> > GWT does not know which implementation you will choose). So in case of 
> List 
> > its better to directly use ArrayList of whatever List implementation you 
> > would like to use in the method signature. 
>
> You mean something like this, or is it ok? 
>
> public static class Util { 
> private static SpeicherServiceAsync instance; 
> public static SpeicherServiceAsync getInstance(){ 
> if (instance == null) { 
> instance = GWT.create(SpeicherService.class); 
> } 
> return instance; 
> } 
> }


No I mean something like:

public interface MyService extends RemoteService {
  public void save(List<String> items);
  public List<String> getItems();
}

With such a service GWT will generate Serializer classes for all classes 
that implement List (ArrayList, LinkedList, etc) which will increase the 
resulting javascript code. So its better to use a concrete implementation of 
List, e.g.:

public interface MyService extends RemoteService {
  public void save(ArrayList<String> items);
  public ArrayList<String> getItems();
}

Its not related to the code you posted here, but I thought it would be a 
nice info for you because at some point in your application you may want to 
transfer lists of objects between client and server.

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/_63OtnpVTIUJ.
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.

Reply via email to