Interface UiNavigationManager

    • Method Detail

      • getRequiredController

        default <W extends io.github.mmm.ui.api.widget.UiRegularWidget> UiController<W> getRequiredController​(String id)
        Type Parameters:
        W - type of the view.
        Parameters:
        id - the ID of the requested UiController.
        Returns:
        the requested UiController.
        Throws:
        io.github.mmm.base.exception.ObjectNotFoundException - if no UiController exists with the given id.
      • getCurrentPlace

        UiPlace getCurrentPlace()
        Returns:
        the current UiPlace. Will be null until initialized by first navigation.
      • navigateBack

        UiPlace navigateBack()
        This method navigates back in the history to the UiPlace that has been visited before. In a web-application this can also be triggered by pressing the back button.
        Returns:
        the new UiPlace that we just navigated back to. Will be null if there is no history left.
      • navigateForward

        UiPlace navigateForward()
        This method navigates forward in the history. After navigateBack() was invoked, this method will go to the UiPlace that has been visited before the invocation of navigateBack(). In a web-application this can also be triggered by pressing the forward button.
        Returns:
        the new UiPlace that we just navigated forward to. Will be null if we are already at the end of the history and nothing is left to navigate forward.
      • navigateTo

        void navigateTo​(UiPlace place,
                        boolean replace)
        Navigates to the given UiPlace.
        Parameters:
        place - is the UiPlace identifying the UiController to open.
        replace - - if true the current place will be replaced with the given UiPlace, false otherwise (default). Replacing is e.g. helpful for UiControllers that do logical decisions and only redirect to the actual UiPlace.
      • updatePlace

        void updatePlace​(UiPlace place)
        Replaces the current place with the given UiPlace without creating a new entry in the navigation history.
        Parameters:
        place - the updated UiPlace. Currently the ID of the current place may not change. This is only to update parameters. E.g. if you want to represent the selection of a master-detail dialog in the location (URL) you can use a parameter. This method allows to update the UiPlace and therefore the location without adding it to the history so navigateBack() navigating back} is not replaying the entire history of the end-users selection what is typically undesired.