public class NavigationControl extends Object
PageHiding methods. If the parameter is present,
the page navigation will not be carried out until proceed() is invoked.
This is useful for interrupting page navigations and then resuming at a later time (for example,
to prompt the user to save their work before transitioning to a new page).| Constructor and Description |
|---|
NavigationControl(Navigation navigation,
Runnable runnable) |
NavigationControl(Navigation navigation,
Runnable runnable,
Runnable interrupt) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasRun() |
void |
interrupt()
Interrupt the navigation process.
|
void |
proceed()
Causes page navigation to proceed.
|
<C> void |
redirect(Class<C> toPage)
Redirect to a given page safely.
|
<C> void |
redirect(Class<C> toPage,
Multimap<String,String> state)
Redirect to a given page safely.
|
public NavigationControl(Navigation navigation, Runnable runnable)
public NavigationControl(Navigation navigation, Runnable runnable, Runnable interrupt)
public void proceed()
public void interrupt()
public <C> void redirect(Class<C> toPage)
toPage - Page class annotated with Page.public <C> void redirect(Class<C> toPage, Multimap<String,String> state)
toPage - page class annotated with Page.state - Pages state map.public boolean hasRun()
Copyright © 2020 Treblereel. All rights reserved.