Re: Chained ListEditors
From the code you sent me by mail, the problem is that you're editing B with a 'null' c and then call listEditor.setValue(newList) as an attempt to assign B.c. This won't work.
-- You have to assign a non-empty list to B.c before you edit it (i.e. just after the context.create(B.class), before you hand the B proxy to the list for editing).
This is because the list passed to ListEditor#setValue is modified in-place, it's never assigned to the edited field. This is the same for all editors with the exception of LeafValueEditors.
On Monday, November 11, 2013 10:50:24 AM UTC+1, almagnit wrote:
On Monday, November 11, 2013 10:50:24 AM UTC+1, almagnit wrote:
Flush results: http://pastebin.com/En8Ughnj Is obtained that the object B was added to the object A, and object C still remains in the array editedProxiesпонедельник, 11 ноября 2013 г., 3:47:05 UTC+4 пользователь almagnit написал:I have multiple entities with a one-to-many relations, such as:A { List<B> b; }B { List<C> c; }C { some fields }I'm trying to edit these entities by the editorsAEditor extends Editor {BListEditor b...}BListEditor implements IsEditor<ListEditor<BProxy, BListEditor.BItemEditor>>{BItemEditor implements Editor<BProxy>{CListEditor c...}}CListEditor implements IsEditor<ListEditor<CProxy, CListEditor.CItemEditor>>{CItemEditor implements Editor<CProxy>{}}In the UI it looks like:A - Container with fields and list of items B(list of grids)B - Container with combobox and grid - CC - editable gridSo when I try to edit an already saved data it works fine.But if I dynamically create B and C, then while saving list B.c == nullWhy RF doesn't send list of CListEditor?
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home