Wednesday, September 22, 2010

Re: List in a GWT-RPC

Stefan Wokusch wrote:
> Hello everybody,
> my architecture uses the Entities with mappinginformations for the
> server and the client. Best practise at the Servermodel means using
> List, Set and other Interfaces in the Model. This causes the GWT-RPC
> to use many unneccesary Classes here.
> This causes some warnings and many unneccesary client code, because
> there are used some gwt-deprecated classes inherit from List.
> For List for example, i always send ArrayLists from and to the Client.
>
> Is there a way to annotate the Attribute to other ways to say what
> classes can be send for this attribute, to prevent the GWT-RPC from
> scanning for possible classes?
>
> Thanks
> Stefan
No, but you can create a custom field serializer class, one for each
class to be serialized, although it will feel like overkill for what you
want. The alternative is to accept that GWT best practice is just
different from regular java, and put ArrayList etc directly in your
interfaces.

HTH
Paul

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment