Ryan McFall
unread,May 27, 2012, 7:19:38 AM5/27/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
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
I am trying to use the polymorphism features of GWT 2.4, and am
running into a problem that the client side code is not seeing the
right kind of proxy returned.
I have the following objects:
- A Survey object, which contains a list of SurveyQuestion objects.
There are corresponding RF proxy interfaces declared for both Survey
(ISurvey) and SurveyQuestion (ISurveyQuestion)
- MultipleChoiceQuestion is a subclass of SurveyQuestion, with a
corresponding proxy interface declared (IMultipleChoiceQuestion),
which extends the proxy for SurveyQuestion (ISurveyQuestion)
- My service method is annotated with the @ExtraTypes annotation and
includes the class IMultipleChoiceQuestion
When the server side method that returns a Survey is invoked, the type
of the object in the Survey's list of SurveyQuestion objects is in
fact MultipleChoiceQuestion (instead of SurveyQuestion).
But, the proxy returned on the client is an instance of
ISurveyQuestion, not IMultipleChoiceQuestion, as I expect it to be.
Am I missing something?
Thanks,
Ryan