Package io.jmix.ui.component
Class DataGrid.EditorOpenEvent<E>
java.lang.Object
java.util.EventObject
io.jmix.ui.component.DataGrid.AbstractDataGridEvent
io.jmix.ui.component.DataGrid.AbstractDataGridEditorEvent<E>
io.jmix.ui.component.DataGrid.EditorOpenEvent<E>
- All Implemented Interfaces:
Serializable
An event that is fired before the DataGrid editor is opened.
Provides access to the components that will be used in the editor,
giving the possibility to change their values programmatically.
Sample usage:
dataGrid.addEditorOpenListener(event -> {
Map<String, Field> fields = event.getFields();
Field field1 = fields.get("field1");
Field field2 = fields.get("field2");
Field sum = fields.get("sum");
ValueChangeListener valueChangeListener = e ->
sum.setValue((int) field1.getValue() + (int) field2.getValue());
field1.addValueChangeListener(valueChangeListener);
field2.addValueChangeListener(valueChangeListener);
});
- See Also:
-
Field Summary
Fields inherited from class io.jmix.ui.component.DataGrid.AbstractDataGridEditorEvent
fields, item
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
-
Method Summary
Methods inherited from class io.jmix.ui.component.DataGrid.AbstractDataGridEditorEvent
getField, getFields, getItem
Methods inherited from class io.jmix.ui.component.DataGrid.AbstractDataGridEvent
getSource
Methods inherited from class java.util.EventObject
toString
-
Constructor Details
-
EditorOpenEvent
- Parameters:
component
- the DataGrid from which this event originatesitem
- the editing itemfields
- the map, where key - DataGrid column's id and value - the field that is used in the editor for this column
-