Is there any way to get the current read bean from the addStatusChangeListener event?
List<ObjectNode> inputData = new ArrayList<>();
ListDataProvider<ObjectNode> dataProvider = new ListDataProvider<>(inputData);
Grid<ObjectNode> grid = new Grid<>(dataProvider);
grid.getEditor().setEnabled(true);
Binder<ObjectNode> binder = grid.getEditor().getBinder();
...
ComboBox<String> fieldSelect = new ComboBox<>();
...
binder.addStatusChangeListener(event -> {
// or event.getBinder().getBean() ?
fieldSelect.setItems(createRowIndividualComboList(event.getBean()));
});
I want to set an individual list for each ComboBox, but I have no idea how to get the current read data of the editor.
And I want to keep the buffered editor mode.
Will this opening event triggered before or after the status change event?
Definitely before, since you get it when you open the editor and start editing. The status change is emited later when validation statuses change when you edit.
Will this opening event triggered before or after the status change event?
Definitely before, since you get it when you open the editor and start editing. The status change is emited later when validation statuses change when you edit.
I just checked it now. Sadly this seemed no to be the case.
Are there any other possibilities to retrieve the bean value, so that I can generate an individual ComboBox list?
If I could get the changed (buffered) bean would be even better.
// first this is triggered three times (I have this listener for three ComboBox elements)
grid.getEditor().getBinder().addStatusChangeListener(event -> { ... });
// then this is triggered
grid.getEditor().addOpenListener(event -> { ... });