Package io.jmix.flowui.view
Class View.AfterCloseEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<View<?>>
io.jmix.flowui.view.View.AfterCloseEvent
- All Implemented Interfaces:
Serializable
The second (after
View.BeforeCloseEvent
) event in the view closing process.
In this event listener, you can show notifications or dialogs after closing the view, for example:
@Subscribe protected void onAfterClose(AfterCloseEvent event) { notifications.show("Just closed"); }
Note the event can be triggered few times for one View
instance. It may happen if
the user tries to navigate to the same View
, which is currently opened. In this case,
View.AfterCloseEvent
is triggered, because we "close" the View
, however due to navigation
the same instance of View
will be opened. It means View.AfterCloseEvent
will be triggered again
for the same View
instance, when user close the View or navigates to another one.
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
closedWith
(StandardOutcome outcome) Checks that view was closed with the givenoutcome
.Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListener
Methods inherited from class java.util.EventObject
toString
-
Field Details
-
closeAction
-
-
Constructor Details
-
AfterCloseEvent
-
-
Method Details
-
getCloseAction
- Returns:
- action passed to the
View.close(CloseAction)
method orNavigateCloseAction
-
closedWith
Checks that view was closed with the givenoutcome
.
-