Hi,

what you are doing is an anonymous class. Anonymous class do behave
strange sometime.
For example, they have only one instance. This might be the reason why
GWT fails.

When you expect to have the overwritten version passed over the net,
you the create a real class.

Stefan Bachert
http://gwtworld.de

On 30 Apr., 15:04, Flueras Bogdan <[email protected]> wrote:
> I use GWT 2.0.3.
> Foo is a GWT serializable class, implements IsSerializable, has
> primitive and serializable members as well as other transient members
> and a no-arg constructor.
>
> class Foo implements IsSerializable {
>  // transient members
>  // primitive members
>   public Foo() {}
>   public void bar() {}
>
> }
>
> Also a Service which uses Foo instance in RPC comunication.
>
> // server code
> public interface MyServiceImpl {
>   public void doStuff(Foo foo);
>
> }
>
> public interface MyServiceAsync {
>        void doStuff(Foo foo, AsyncCallback<Void> async);
>
> }
>
> How i use this:
>
> private MyServiceAsync myService = GWT.create(MyService.class);
> Foo foo = new Foo();
> ...
> AsyncCallback callback = new new AsyncCallback {...};
> myService.doStuff(foo, callback);
>
> In the above case the code is running, and the onSuccess() method of
> callback instance gets executed.
>
> But when I override the bar() method on foo instance like this:
>
> Foo foo = new Foo() {
>    public void bar() {
>      //do smthng different
>    }};
>
>  AsyncCallback callback = new new AsyncCallback {...};
>  myService.doStuff(foo, callback);
>
> I get the GWT SerializationException with no message. Anyway the first
> stacktrace element shows "SerializerBase.check(SerializerBase.java:
> 161)"
>
> Tnx.
>
> --
> 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 
> athttp://groups.google.com/group/google-web-toolkit?hl=en.

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

Reply via email to