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
Enclosing class:
View<T extends com.vaadin.flow.component.Component>

public static class View.ReadyEvent extends com.vaadin.flow.component.ComponentEvent<View<?>>
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.

See Also:
  • Constructor Details

    • ReadyEvent

      public ReadyEvent(View<?> source)