Class DataContext.ChangeEvent

java.lang.Object
java.util.EventObject
io.jmix.flowui.model.DataContext.ChangeEvent
All Implemented Interfaces:
Serializable
Enclosing interface:
DataContext

public static class DataContext.ChangeEvent extends EventObject
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:
  • Constructor Details

  • Method Details

    • getSource

      public DataContext getSource()
      The data context which sent the event.
      Overrides:
      getSource in class EventObject
    • getEntity

      public Object getEntity()
      Returns the changed entity.