I'm trying to bind a TableViewer to a
models = List<ModelObject>
, but I don't really get the hang of it. The binding should be possible via master-detail and a databinding context (DataBindingContext), so that I'm able to write the changes of the list (and its elements) to the model only on request (dbc being set to POLICY_ON_REQUEST), i.e. in a saving action of an editor. With simple Text fields this works like a charm, but I can't find any similar example for TableViewers. When I look at the API for instance of ViewerSupport, then I can only bind it, but without the option of giving a DBC or a master-detail. This works:
ViewerSupport.bind(aViewer, new WritableList(models, ModelObject.class), BeanProperties.value(ModelObject.class, "name")));
But as stated it doesn't allow to use a dbc nor a master-detail.
Is there a solution to that, or does TableViewer just not support databinding as I intend to use it? Is there a workaround or some API i missed?
Thx for the answers in advance!