Class Screen.BeforeShowEvent

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

@TriggerOnce public static class Screen.BeforeShowEvent extends EventObject
Event sent right before the screen is shown, i.e. it is not added to the application UI yet. Security restrictions are applied to UI components. Data is not loaded yet for screens having the DataLoadCoordinator facet.

In this event listener, you can load data, check permissions and modify UI components. For example:

     @Subscribe
     protected void onBeforeShow(BeforeShowEvent event) {
         customersDl.load();
     }
 

You can abort the process of opening the screen by throwing an exception. Note that if you have created notifications in this listener before the exception, they will still be shown even though the screen will not.

See Also:
  • Constructor Details

    • BeforeShowEvent

      public BeforeShowEvent(Screen source)
  • Method Details