On Wednesday, July 24, 2013 2:36:34 PM UTC+2, Thomas Broyer wrote:
>
>
>
> On Wednesday, July 24, 2013 1:39:19 PM UTC+2, GWTter wrote:
>>
>> Will do. My approach would involve distinct proxies since I don't think 
>> RF allows for inheritance on EntityProxys even if they both have @proxyfor 
>> defined because it looks for the methods defined exactly on the proxy (it 
>> definitely won't currently let you do it server-side with your locators). 
>> This is the only drawback I can see using this approach since you'd have to 
>> redefine fields that would be granted with inheritance. But I'll definitely 
>> give both a try again.
>>
>
> Inheritance of proxies works well; RequestFactory even supports 
> polymorphism (o in your case you'll want to test which exact proxy RF 
> returns, and possibly split the common properties out to an interface used 
> as the super-interface for 2 distinct, unrelated proxies)
> What won't work currently are generics and overrides with co-variant 
> return types (see 
> https://gwt-review.googlesource.com/#/c/3831/2/user/test/com/google/web/bindery/requestfactory/gwt/client/RequestFactoryGenericsTest.java
>  for 
> a "gory" test), but it otherwise works very well.
>

BTW, see “Polymorphic type-mapping rules” in 
http://www.gwtproject.org/doc/latest/DevGuideRequestFactory.html#transportable
And I'd even say that not only this is a supported use-case, it's actually 
the approach I'd recommend. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to