Class View.InitEvent

java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<View<?>>
io.jmix.flowui.view.View.InitEvent
All Implemented Interfaces:
Serializable
Enclosing class:
View<T extends com.vaadin.flow.component.Component>

public static class View.InitEvent extends com.vaadin.flow.component.ComponentEvent<View<?>>
The first event in the view opening process.

The view and all its declaratively defined components are created, and dependency injection is completed. Some visual components are not fully initialized, for example buttons are not yet linked with actions.

In this event listener, you can create visual and data components, for example:

     @Subscribe
     protected void onInit(InitEvent event) {
         Label label = uiComponents.create(Label.class);
         label.setText("Hello World");
         getContent().add(label);
     }
 
See Also:
  • Constructor Details

    • InitEvent

      public InitEvent(View<?> source)