Tuesday, April 26, 2011

How to persist child lists with an entity proxy using the Editor framework?

I have an object "a" that has a number of fields.  One of those fields is a list of object "B".  In My editor, I can create,edit save, etc "A", however even though the list of "B" is proxied, it is never persisted (it gets lost between the submit, and the service).  Are there any examples available of submitting an object graph that includes a child list?  If not, can anyone explain how this is done?

In the examples online, we have a simple graph:

A
|
+--B

And you can create the instance to edit it by doing:
A a = context.create(A.class);
B b = context.create(B.class);
a.setB(b);
context.edit(a);

But how do you edit a List?

A
|
+--List<B>



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