I’m having a problem using the new RequestFactory feature in 2.1.1
when trying to serialise an object, using the EntityProxy, with using
it's interface. If I have the following entity proxy, entity interface
and its implementation, a ‘UnexpectedException: The domain type
com.server.MyEntity cannot be sent to the client’.
@ProxyFor(value = MyEntity.class)
public interface MyEntityProxy extends EntityProxy {
String getAProperty();
}
public class MyEntityImpl implements MyEntity {
....
}
public interface MyEntity {
String getAProperty();
}
This doesn’t work, because the getSupertypes method in the
RequestFactoryInterfaceValidator return a list of the following types:
- Lcom/server/MyEntityImpl
- Ljava/lang/Object;
- Lcom/server/MyEntity
And getEntityProxyTypeName in RequestFactoryInterfaceValidator breaks
from the supertypes upcast loop if an object type is found before the
required type defined on the entityproxy (i.e. never reaches my
interface).
If I change the value of the ProxyFor from the interface to its
implementation then it works (i.e. @ProxyFor(MyEntityImpl.class),
which is not desirable.
Does anyone know if this is possible or a limitation?
Regards,
John
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.