Package io.jmix.flowui.view
Class View.ReadyEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<View<?>>
io.jmix.flowui.view.View.ReadyEvent
- All Implemented Interfaces:
Serializable
The last (after
View.BeforeShowEvent
) event in the view opening process.
In this event listener, you can make final configuration of the view according to loaded data and show notifications or dialogs:
@Subscribe protected void onReady(ReadyEvent event) { notifications.show("Just opened"); }
Note consequent navigation to the same View
, which currently opened, leads to
triggering View.ReadyEvent
once more for the same View
instance. For example, the user
navigates to the View
first time: View
instance is created, View.ReadyEvent
is
triggered. Then the user navigates to the same View
, which currently opened: we have the same
View
instance, but View.ReadyEvent
is triggered again.
If View.ReadyEvent
method listener contains logic of adding components or loading data, it will be
performed again, which can lead to adding duplicated components or reloading data.
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
-
Method Summary
Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListener
Methods inherited from class java.util.EventObject
toString
-
Constructor Details
-
ReadyEvent
-