RequestFactory with ValueType for interfaces / abstract classes
48 views
Skip to first unread message
Nachiket
unread,
Aug 6, 2011, 9:38:44 AM8/6/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
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,
Nachiket
unread,
Aug 9, 2011, 2:33:33 AM8/9/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
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.