gwtgxtgwt-editors

Chained ListEditors


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 editors

AEditor 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 - C
C - editable grid

So 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 == null

Why RF doesn't send list of CListEditor?


Solution

  • Solution

    Need to initialize the the collections in the created proxy.