Friday, January 4, 2013

ListEditor adding immutable object from another RequestFactory request.

I'm not sure of the contract with a ListEditor. If I fetch an object using a different RequestContext is it my responsibility to make it editable in the editors RequestContext before adding to the list?

The problem I'm having is that if I don't then when adding to the ListEditor the method AbstractEditorDelegate$Chain<R,S>.attach(R, S) line: 83 will grab a mutable copy so the item editor will have a different instance to the one in the list... This seems bad.

So should I do listEditor.getList().add(requestContext.edit(newThing))  ?  

Cheers

Sam



 

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate