On Thursday, July 28, 2011 11:38:55 PM UTC+2, Ryan McFall wrote:
>
> I've read through the documentation on Polymorphism support in 
> RequestFactory, and am finding it difficult to see the big picture 
> based on what is written.  This is what I hope it means:  I have a 
> domain class Shape, and subclasses Circle and Square, along with their 
> corresponding proxies ShapeProxy, CircleProxy and SquareProxy. 
>
> I am then able to write a service method that returns a list of 
> ShapeProxy objects; which can either be instances of CircleProxy or 
> SquareProxy (and perhaps ShapeProxy if it is non abstract). 
>
> Am I understanding the intent correctly?


Yes. For that, you'll have to explicitly list CircleProxy and SquareProxy in 
an @ExtraTypes annotation somewhere on your RequestFactory, RequestContext 
or proxy (directly referenced from a RequestContext or another proxy). In 
that case, I'd put it on ShapeProxy.
 

> If so, I assume ShapeProxy 
> extends EntityProxy, and the other proxy interfaces then extend 
> ShapeProxy, right?
>

ShapeProxy could extend either EntityProxy or ValueProxy; other interfaces 
would have to indeed extend ShapeProxy.
 

>
> Thanks for clarifying for me,



FYI, this is actually already documented in the dev guide: 
http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html#transportable
 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/z-eJd_ps3TgJ.
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