I did some debugging, looking into the GWT source, and it seems like
there's a problem with decoding the elements of the set. The JSON sent
over the wire looks fine, but when the data structure is being
constructed on the server side, all of the properties are null at the
time that hashCode() is called on the server-side proxy instance. So,
it's trying to pay attention to more than the ID, but it's doing it
too soon.. before the proxies have been fully initialized.

I submitted an issue for this:
http://code.google.com/p/google-web-toolkit/issues/detail?id=6354

-- Brian


On Fri, May 13, 2011 at 11:26 AM, Eric Andresen <[email protected]> wrote:
> I switched my Set<>s to List<>s and it works no problem.
> What is interesting is that I use Set<EntityProxy> all over the place
> without any trouble, but when I use the Set<ValueProxy> it seems to fail.
>  If I had to speculate, i'd guess that the RF is trying to recreate the
> collection using a hashcode based on the id of the proxy, which doesn't
> exist for a ValueProxy.
>
>
> Thanks,
> Eric
> On Fri, May 13, 2011 at 8:58 AM, Brian Reilly <[email protected]>
> wrote:
>>
>> This sounds like a problem that I ran into this as well, and even had
>> a chance to sit down with David Chandler at Google I/O to look over
>> it. Your case is more straightforward than mine (which involved trying
>> to add to a Set on fetched ValueProxy) but I'd bet it's the same
>> problem. I'm planning to file a bug about it after gathering a little
>> more information and simplifying my test case.
>>
>> In the mean time, Lists don't seem to have the same problem, if that
>> helps you at all.
>>
>> -- Brian
>>
>>
>> On Thu, May 12, 2011 at 4:19 PM, Eric Andresen <[email protected]>
>> wrote:
>> > I have an application that creates a Set<MyClassProxy> (a ValueProxy),
>> > and
>> > sends that set across the wire using the RequestFactory.
>> > When I add 3 distinct elements into the set and fire the context, I only
>> > get
>> > one item in the set on the server side.
>> > What is interesting is that I can see my setters being called inside my
>> > bean
>> > class, so I know all three instances are constructed.  I only see the
>> > hashCode() method called once, meaning something inside the
>> > RequestFactory
>> > must be clobbering them before they're added to the HashSet.
>> > Has anyone seen this behavior before?  I have other places in the
>> > application that pass Set<EntityProxy>s across the wire, so it's not
>> > happening all the time.
>> > Thanks,
>> > Eric
>> >
>> > --
>> > 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.
>> >
>>
>> --
>> 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.
>>
>
> --
> 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.
>

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

Reply via email to