Thanks for the clarification, Thomas. I did read the document you are referencing (actually it's copied in another document which was linked to by David in his original post for this thread). It seems to me that the section on polymorphism is a bit too focused on the details of determining when a proxy will be generated, and not enough on the high-level issue of polymorphism as I described in my post. Once I know that this is indeed what is being discussed, I can see how the details on that page are relevant (the details seem to describe the process used by the RF framework for determining which interfaces need to have a proxy generated for them).
Adding a use case before the technical details would make the documentation a bit easier to understand, at least for me. Ryan On Jul 28, 7:41 pm, Thomas Broyer <[email protected]> wrote: > 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.h... -- 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.
