Package io.jmix.flowui.model
Class DataContext.PostSaveEvent
java.lang.Object
java.util.EventObject
io.jmix.flowui.model.DataContext.PostSaveEvent
- All Implemented Interfaces:
Serializable
- Enclosing interface:
- DataContext
Event sent after saving changes.
In this event listener, you can get the collection of saved entities returned
from DataManager
or a custom service. These entities are already merged
into the DataContext. For example:
@Subscribe(target = Target.DATA_CONTEXT) protected void onPostSave(DataContext.PostSaveEvent event) { log.debug("Saved: " + event.getSavedInstances()); }
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionPostSaveEvent
(DataContext dataContext, Collection savedInstances, boolean entitiesReloaded) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Methods inherited from class java.util.EventObject
toString
-
Constructor Details
-
PostSaveEvent
-
-
Method Details
-
getSource
- Overrides:
getSource
in classEventObject
- Returns:
- the data context which sent the event.
-
getSavedInstances
- Returns:
- the collection of saved entities or empty collection if saved entities were not reloaded (entitiesReloaded == false).
-
isEntitiesReloaded
public boolean isEntitiesReloaded()- Returns:
- true if entities have been reloaded and merged after save, false otherwise
-