Hi,
anyone has some ideas about this problem?

Thanks!!

Il giorno mercoledì 22 agosto 2012 18:06:25 UTC+2, bond ha scritto:
>
> Hi,
> I'd like to use polymorphic type mapping with use of Locator.
>
> I'm in this situation:
>
> @Entity class MyBase {...}
> @Entity class MyChild1 extends MyBase {...}
> @Entity class MyChild2 extends MyBase {...}
> ...
> @ProxyFor(MyBase.class) class MyBaseProxy extends EntityProxy {...}
> @ProxyFor(MyChild1.class) class MyChild1Proxy extends MyBaseProxy {...}
> @ProxyFor(MyChild2.class) class MyChild2Proxy extends MyBaseProxy {...}
> ...
>
> @Service(value = MyBaseRequestDao.class, locator = DaoLocator.class)
> @ExtraTypes({ MyChild1.class, MyChild2.class })
> public interface MyBaseRequest extends RequestContext {
>     Request<MyBaseProxy> getStuff(); // MyChild1 here
> }
> ...
> Request<MyBaseProxy> getStuffRequest = request.getStuff();
> getStuffRequest.fire(new Receiver<MyBaseProxy>() {
>     @Override
>     public void onSuccess(MyBaseProxy proxy) {
>         if(proxy instanceof  MyChild1Proxy)           
> button.setText(((MyChild1Proxy)proxy).getQwerty()); // HERE!
>     }
> });
>
> I'm using Hibernate on the server and in the server (on my MyBaseRequestDao) 
> I can see the correct type of objects. On the client instead the polymorphic 
> mapping seems don't work.
>
> Maybe the problem is the use of locator?
>
> Thanks very much 
>
>
>

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