Package io.github.mmm.ui.api.controller
Interface UiNavigationManager
- All Superinterfaces:
io.github.mmm.event.EventSource<UiNavigationEvent,
UiNavigationEventListener>
public interface UiNavigationManager
extends io.github.mmm.event.EventSource<UiNavigationEvent,UiNavigationEventListener>
Interface to manage
UiController
s.- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic UiNavigationManager
get()
<W extends io.github.mmm.ui.api.widget.UiRegularWidget>
UiController<W> getController
(String id) default <W extends io.github.mmm.ui.api.widget.UiRegularWidget>
UiController<W> This method navigates back in the history to theUiPlace
that has been visited before.This method navigates forward in the history.default void
navigateTo
(UiPlace place) Navigates to the givenUiPlace
.void
navigateTo
(UiPlace place, boolean replace) Navigates to the givenUiPlace
.void
updatePlace
(UiPlace place) Replaces thecurrent place
with the givenUiPlace
without creating a new entry in the navigation history.Methods inherited from interface io.github.mmm.event.EventSource
addListener, addListener, addWeakListener, removeListener
-
Method Details
-
getController
- Type Parameters:
W
- type of theview
.- Parameters:
id
- theID
of the requestedUiController
.- Returns:
- the requested
UiController
ornull
if no suchUiController
exists.
-
getRequiredController
default <W extends io.github.mmm.ui.api.widget.UiRegularWidget> UiController<W> getRequiredController(String id) - Type Parameters:
W
- type of theview
.- Parameters:
id
- theID
of the requestedUiController
.- Returns:
- the requested
UiController
. - Throws:
io.github.mmm.base.exception.ObjectNotFoundException
- if noUiController
exists with the givenid
.
-
getCurrentPlace
UiPlace getCurrentPlace()- Returns:
- the current
UiPlace
. Will benull
until initialized by firstnavigation
.
-
updatePlace
Replaces thecurrent place
with the givenUiPlace
without creating a new entry in the navigation history.- Parameters:
place
- the updatedUiPlace
. Currently theID
of thecurrent place
may not change. This is only to updateparameters
. E.g. if you want to represent the selection of a master-detail dialog in the location (URL) you can use aparameter
. This method allows to update theUiPlace
and therefore the location without adding it to the history sonavigateBack()
navigating back} is not replaying the entire history of the end-users selection what is typically undesired.
-
get
- Returns:
- the instance of this
UiNavigationManager
.
-