GWT RequestFactory:InterfacesをRequestContextに継承します
-
14-11-2019 - |
質問
私の組織のrequestContextインターフェースを持っています。
@Service(OrganizationDAO.class)
public interface OrganizationRequestContext extends RequestContext
{
Request<OrganizationProxy> findOrganization(Long id);
InstanceRequest<OrganizationProxy, Void> persist();
InstanceRequest<OrganizationProxy, Void> remove();
}
.
今、私はそれらを最後の2つの関数を取り、私のrequestContextsのすべてを私のクライアントコードで同じに扱うことができるようにそれらを私自身のデザインのPersistentRequestContext
に入れたい:
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
.
PersistableRequestContextをextendcontextを拡張する場合、サーバーはそれが特定のDAOサービスにリンクされていないことを訴えます。
私の様々なRequestContextインターフェイスのRequestContext
以外に共通のインターフェイスを拡張する方法はありますか?
解決
This issue has been fixed in GWT 2.4. Thanks Google!
http://code.google.com/p/google-web-toolkit/issues/detail?id=6035
所属していません StackOverflow