GWT:传输带有 IsSerialized 对象的接口
大家早上好,
我正在尝试通过 GWT RPC 调用传输以下调用:
public class MVCController extends Composite implements IsSerializable {
//..
private MVCClass listeners;
public void addListener(MVCClass _listener){
listeners = _listener;
}
//....
}
MVCClass 是以下接口:
import com.google.gwt.user.client.rpc.IsSerialized;
public interface MVCInterface extends IsSerializable{
public abstract void labelTextChange(String _text);
}
每当我进行 RPC 调用时,应用程序就会崩溃,并显示有关
Failed to create an instance of ... via deferred binding
Can I send an Interface with an RFC call? 的
信息。问候斯特凡
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, saying something about
Failed to create an instance of ... via deferred binding
Can I send an Interface with an RFC call?
Regards Stefan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法序列化 gwt 小部件,这就是您收到该异常的原因。您的类
MVCController
继承自Composite
,其基类是Widget
。You can not serialize a gwt widget that is why you get that exception. Your class
MVCController
extends fromComposite
whose base class isWidget
..