Class Screen.InitEvent

java.lang.Object
java.util.EventObject
io.jmix.ui.screen.Screen.InitEvent
All Implemented Interfaces:
Serializable
Enclosing class:
Screen

@TriggerOnce public static class Screen.InitEvent extends EventObject
Event sent when the screen controller and all its declaratively defined components are created, and dependency injection is completed. Nested fragments are not initialized yet. Some visual components are not fully initialized, for example buttons are not linked with actions.

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

     @Subscribe
     protected void onInit(InitEvent event) {
         Label<String> label = uiComponents.create(Label.TYPE_STRING);
         label.setValue("Hello World");
         getWindow().add(label);
     }
 
See Also: