题
我有我的omancumantseRuestContext界面,它有效:
@Service(OrganizationDAO.class)
public interface OrganizationRequestContext extends RequestContext
{
Request<OrganizationProxy> findOrganization(Long id);
InstanceRequest<OrganizationProxy, Void> persist();
InstanceRequest<OrganizationProxy, Void> remove();
}
.
现在我想拿到最后两个函数并将它们放在我自己的设计的一个生成播码代码中,以便我可以在我的客户端代码中处理所有请求窗口:
public interface PersistableRequestContext<T extends BaseProxy>
{
InstanceRequest<T, Void> persist();
InstanceRequest<T, Void> remove();
}
.
...
@Service(OrganizationDAO.class)
public interface OrganizationRequestContext extends RequestContext, PersistentRequestContext<OrganizationProxy>
{
Request<OrganizationProxy> findOrganization(Long id);
}
.
但是这失败了验证:服务器抱怨
[ERROR] com.activegrade.shared.data.PersistableRequestContext is not a RequestContext
.
如果我制作persistabledequestContext扩展equestContext,那么服务器抱怨它没有链接到任何特定的DAO服务。
是否有任何方法可以在我的各种请求窗口接口中以PersistentRequestContext
扩展公共接口?
解决方案
This issue has been fixed in GWT 2.4. Thanks Google!
http://code.google.com/p/google-web-toolkit/issues/detail?id=6035
不隶属于 StackOverflow