Package io.jmix.ui.model
Class DataContext.ChangeEvent
java.lang.Object
java.util.EventObject
io.jmix.ui.model.DataContext.ChangeEvent
- All Implemented Interfaces:
Serializable
- Enclosing interface:
- DataContext
Event sent when the context detects changes in an entity, a new instance is merged or an entity is removed.
In this event listener, you can react to changes of tracked entities, for example:
@Subscribe(target = Target.DATA_CONTEXT) protected void onChange(DataContext.ChangeEvent event) { log.debug("Changed entity: " + event.getEntity()); indicatorLabel.setValue("Changed"); }
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the changed entity.The data context which sent the event.Methods inherited from class java.util.EventObject
toString
-
Constructor Details
-
ChangeEvent
-
-
Method Details
-
getSource
The data context which sent the event.- Overrides:
getSource
in classEventObject
-
getEntity
Returns the changed entity.
-