public interface ViewChangeListener extends Serializable
| Modifier and Type | Interface and Description |
|---|---|
static class |
ViewChangeListener.ViewChangeEvent
Event received by the listener for attempted and executed view changes.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterViewChange(ViewChangeListener.ViewChangeEvent event)
Invoked after the view is changed.
|
boolean |
beforeViewChange(ViewChangeListener.ViewChangeEvent event)
Invoked before the view is changed.
|
boolean beforeViewChange(ViewChangeListener.ViewChangeEvent event)
This method may e.g. open a "save" dialog or question about the change, which may re-initiate the navigation operation after user action.
If this listener does not want to block the view change (e.g. does not
know the view in question), it should return true. If any listener
returns false, the view change is not allowed and
afterViewChange() methods are not called.
event - view change eventvoid afterViewChange(ViewChangeListener.ViewChangeEvent event)
beforeViewChange
method blocked the view change, this method is not called. Be careful of
unbounded recursion if you decide to change the view again in the
listener.event - view change eventCopyright © 2023 Vaadin Ltd. All rights reserved.