Well, you're already doing that, but you don't like the performance
consequences.
I think the answer is to get out of the "heterogeneous" mindset. This
isn't Java. Adopt a less elegant looking solution in which you
"structure up" your responses using specific type references. How to
apply that strategy to your particular case is really a project-
specific design issue. There may need to be some "give and take"
throughout the design.
As a note, I've seen non-GWT Java projects in which the developers
(probably coming over from Perl) prefer to represent everything as
maps of objects. So instead of a class with clearly typed properties,
everything is a bag of anything. This pretty much defeats the purpose
of a strongly typed language, although you can get it to work. It's
like implementing everything through reflection.
So, if you take my advice above, you may also end up with a better
designed product, from an OO point of view, which means better compile
time error removal, etc.
Walden
On Oct 9, 3:39 pm, huherto <[EMAIL PROTECTED]> wrote:
> I have a collection of Serializable objects like this:
>
> class A {
> /**
> * @gwt.typeArgs <java.io.Serializable>
> */
> List list;
>
> }
>
> I need to change it because when I migrate to GWT 1.5.2 , I get
> warnings like this:
> [WARN] Deprecated use of gwt.typeArgs for field
> properties; Please use java.util.Map<java.lang.String,
> com.google.gwt.user.client.rpc.IsSerializable> as the field's type
>
> My first attempt was to change it to:
> class A {
> List<Serializable> list;
>
> }
>
> The problem seems to be that it tries to generate code for all the
> subclasses of Serializable!!! That does not make sense to me since
> when I use Serializable I am thinking any class that that can already
> be used as an RPC argument.
>
> My next attempt was not to hint the gwt compiler using old fashion
> collections.
>
> class A {
> List list;
>
> }
>
> But it is even worst since it tries to generate code for all the
> subclasses of Object.
>
> A similar problem is discussed in this
> thread:http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...
>
> So the question is, how can send heterogeneous objects in a collection?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---