开发者

GWT: transmit an interface with an IsSerializable Object

开发者 https://www.devze.com 2023-02-20 23:32 出处:网络
Good morning everybody, I\'m trying to transmit the following calls with an GWT RPC call: public class MVCController extends Composite implements IsSerializable {

Good morning everybody,

I'm trying to transmit the following calls with an GWT RPC call:

public class MVCController extends Composite implements IsSerializable {
    //..        
    private MVCClass listeners;

    public void addListener(MVCClass _listener){
        listeners = _listener;
    }

    //....
}

The MVCClass is the following interface:

import com.google.gwt.user.client.rpc.IsSerializable;

public interface MVCInterface extends IsSerializable{
    public abstract void labelTextChange(String _text);
}

Whenever I make the RPC call, the application crashes, sayin开发者_开发技巧g something about

Failed to create an instance of ... via deferred binding 

Can I send an Interface with an RFC call?

Regards Stefan


You can not serialize a gwt widget that is why you get that exception. Your class MVCController extends from Composite whose base class is Widget..

0

精彩评论

暂无评论...
验证码 换一张
取 消