Client Side Trustee Inheritance in GWT Requestfactoy

I am using GWT 2.5 RequestFactory, suppose that on the server side I have A, B, C, D4 object on the client side, I have a AProxy, BProxy, CProxy, DProxy, the relevant entities of the server. B, CContinues A. In the object D, I have a method:

A getEntity();

which will actually return Bor C, On the client side DProxy, I have:

AProxy getEntity();

My question is: On the client side, when I receive AProxy, can I direct it to BProxyor CProxy, if not, is there a way to get the proxy server actual

PS In DProxy I have @ExtraTypes({BProxy,CProxy})

+5
source share
1 answer

If BPRoxy extends AProxya @ProxyFor(B.class)(or equivalent) and CProxy extends AProxywith @ProxyFor(C.class)(or equivalent), then yes, it should work: getEntity()returns either AProxy, BProxyor CProxydepending on the object returned by the server.

+4
source

All Articles