【发布时间】:2012-05-08 08:54:08
【问题描述】:
我正在使用 GWT 和 Google App Engine...
我使用 com.google.gwt.core.ext.Generator 在客户端加载动态 Presenter-Classes。
当我在本地测试它时它可以工作。但不在 Google App Engine 上... :-(
PresenterFactory factory = (PresenterFactory) GWT.create(ReflectiveFactory.class);
IDynamicPresenter p = factory.newInstance("ch...NewsPresenter");
这应该在运行时绑定类。
我实现了以下代码: http://programmatica.blogspot.com/2007/10/classfornamefullyqualifiedclassnamenewi.html
是否可以在 GAE 上使用 com.google.gwt.core.ext.Generator?
最诚挚的问候
山姆
【问题讨论】:
-
我无法找出错误。我只得到一个javascript异常,里面写着“伞形异常”,我发现“ClassCast”-异常。我发现 ***.cache.html 在 Firefox 和 IE 中是不同的。 IE 的代码会抛出 ClassCast 异常,而 Firefox 不会。
-
我在没有运行时类转换的情况下编译了它——比它有效!
标签: google-app-engine gwt