Events
Domain Event Classes
Domain events are broadcast through the EventBusService whenever the framework interacts with the domain object members.
They allow subscribers to change either veto the interaction, or to trigger other operations as a result of the interaction.
API | Event class defined by | Published when |
---|---|---|
|
n/a - superclass of the other domain events. |
|
interact with (hide, disable, validate, pre-execute, post-execute) an object’s action. |
||
hide an object’s collection. |
||
interact with (hide, disable, validate, pre-edit, post-edit) an object’s property. |
UI Event Classes
UI events are broadcast on the EventBusService as the result of rendering a domain object.
They allow subscribers to change various presentation aspects of the rendered object.
Note that if the domain object defines its own layout preferences (for example, a title() supporting method) then these will take precedence.
API | Event class defined by @DomainObjectLayout | Published when | Overridden by |
---|---|---|---|
... rendering the title for a domain object. |
|||
... rendering an icon for a domain object. |
|||
... obtaining a CSS class hint for a domain object. |
|||
... obtain an alternative layout for a domain object. |
Lifecycle Events
Lifecycle events are broadcast through the EventBusService when a domain entity is loaded, created, updated to/from the database.
They allow subscribers to trigger other operations as a result of these persistence operations. One use case is to maintain an alternate data store.
It is also possible for the domain object itself to be invoked on a callback.
API | Event class defined by @DomainObject | Published when | Object callback |
---|---|---|---|
|
n/a - superclass of the other lifecycle events. |
|
|
entity is first instantiated using FactoryService Also raised for view models. |
|||
entity is retrieved from the database. |
|||
entity is about to be saved (inserted) into the database using the RepositoryService's
|
|||
entity is first saved (inserted) into the database using the RepositoryService's
|
|||
entity has just been updated in the database. |
|||
entity is about to be updated in the database. |
|||
entity is about to be deleted from the database using the RepositoryService's
|