Package io.jmix.ui.screen
Class MasterDetailScreen.InitEntityEvent<E>
java.lang.Object
java.util.EventObject
io.jmix.ui.screen.MasterDetailScreen.InitEntityEvent<E>
- Type Parameters:
E
- type of entity
- All Implemented Interfaces:
Serializable
- Enclosing class:
- MasterDetailScreen<T>
Event sent before the new entity instance is set to edited entity container.
Use this event listener to initialize default values in the new entity instance, for example:
@Subscribe protected void onInitEntity(InitEntityEvent<Foo> event) { event.getEntity().setStatus(Status.ACTIVE); }
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
-
Method Summary
Methods inherited from class java.util.EventObject
toString
-
Field Details
-
entity
-
-
Constructor Details
-
InitEntityEvent
-
-
Method Details
-
getSource
- Overrides:
getSource
in classEventObject
-
getEntity
- Returns:
- initializing entity
-