Update:

I found that @ExtraTypes is supported in GWT 2.4 for polymorphic
support in RequestFactory.
But unable to understand how to use it, as there are no sample code
available which does that.

Although got this test class which does check polymorphism in request
factory.
http://www.google.com/codesearch#A1edwVHBClQ/user/test/com/google/web/bindery/requestfactory/gwt/client/RequestFactoryPolymorphicTest.java

But there are no sign,how to use Abstract classes..

Looking for pointers/guidance.

Thanks,

On Aug 6, 6:38 pm, Nachiket <[email protected]> wrote:
> Hi,
> Following is my Model
> ---------------------------
> class Person {
>      String getName();
>      Vehicle getVehicle();
>
> }
>
> interface Vehicle {
>    String getCompanyName();
>    String getRegNo();
>    Point getParkingSpaceRequired();
>
> }
>
> abstract class AbstractVehicle {
>
> }
>
> class Motorcycle extends AbstractVehicle {
>
> }
>
> class Car extends AbstractVehicle {
>
> }
>
> ------------------------------
> so creating PersonProxy as EntityProxy was straight forward, and
> working fine for person.getName()
> I have created VehicleProxy as ValueProxy and called fire()
> with .with('vehicle')
>
> But I am getting
> The domain type com....AbstractVehicle$$EnhancerByCGLIB$$e86549b9
> cannot be sent to the client.
>
> On PersonProxy I got
> @ProxyFor(value=Person.class,locator=PersonLocator.class)
>
> on VehicleProxy I got
> @ProxyFor(value=Vehicle.class)
>
> so, How to handle such inheritance in RequestFactory?
> Should I change Vehicle to EntityProxy from ValueProxy? Then How to
> implement methods of VehicleLocator?
>
> Thank you,

-- 
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.

Reply via email to