com.holonplatform.vaadin.navigator

## Interface ViewNavigator.Builder

- All Superinterfaces:
    ViewNavigator.NavigatorBuilder<ViewNavigator.Builder>
  Enclosing interface:
    ViewNavigator

      public static interface ViewNavigator.Builder
      extends ViewNavigator.NavigatorBuilder<ViewNavigator.Builder>

  Builder to create `ViewNavigator` instances

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `ViewNavigator` | `buildAndBind(com.vaadin.ui.UI ui)` Build ViewNavigator instance and bind it to given `ui`
    `ViewNavigator.Builder` | `navigationStateManager(com.vaadin.navigator.NavigationStateManager navigationStateManager)` Set the NavigationStateManager keeping track of the active view and enabling bookmarking and direct navigation.
    `ViewNavigator.Builder` | `viewDisplay(com.vaadin.ui.ComponentContainer container)` Set the `ComponentContainer` which has to used to display `View` instances, replacing the contents of the ComponentContainer with the active view.
    `ViewNavigator.Builder` | `viewDisplay(com.vaadin.ui.SingleComponentContainer container)` Set the `SingleComponentContainer` which has to used to display `View` instances using `SingleComponentContainer.setContent(com.vaadin.ui.Component)`.
    `ViewNavigator.Builder` | `viewDisplay(com.vaadin.navigator.ViewDisplay viewDisplay)` ViewDisplay used to display `View` instances
    `ViewNavigator.Builder` | `withView(String viewName, Class<? extends com.vaadin.navigator.View> viewClass)` Add a default `ViewProvider` (if not already present) and register the given `View` class bound to given view name.

    - ### Methods inherited from interface com.holonplatform.vaadin.navigator.ViewNavigator.NavigatorBuilder

      `addProvider, authenticationEnabled, defaultViewName, defaultViewNavigationStrategy, defaultViewWindowConfigurator, errorView, errorViewProvider, maxNavigationHistorySize, navigateToDefaultViewWhenViewNotAvailable, viewClassProvider, withViewChangeListener`

- - ### Method Detail

    - #### withView

          ViewNavigator.Builder withView(String viewName,
                                         Class<? extends com.vaadin.navigator.View> viewClass)

      Add a default `ViewProvider` (if not already present) and register the given `View` class bound to given view name. This `ViewProvider` supports `StatefulView` view instances.

      View instances will be created according to view scope: for stateful views, an instance is created at first request (for each UI) and the same instance is returned to subsequent view requests. On the contrary, for standard views, a new instance is created and returned to navigator for every view request.

      Parameters:
        `viewName` - View name (not null)
        `viewClass` - View class (not null)
      Returns:
        this

    - #### navigationStateManager

          ViewNavigator.Builder navigationStateManager(com.vaadin.navigator.NavigationStateManager navigationStateManager)

      Set the NavigationStateManager keeping track of the active view and enabling bookmarking and direct navigation.
      Parameters:
        `navigationStateManager` - NavigationStateManager or `null` to use the default implementation
      Returns:
        this

    - #### viewDisplay

          ViewNavigator.Builder viewDisplay(com.vaadin.navigator.ViewDisplay viewDisplay)

      ViewDisplay used to display `View` instances
      Parameters:
        `viewDisplay` - The ViewDisplay
      Returns:
        this

    - #### viewDisplay

          ViewNavigator.Builder viewDisplay(com.vaadin.ui.SingleComponentContainer container)

      Set the `SingleComponentContainer` which has to used to display `View` instances using `SingleComponentContainer.setContent(com.vaadin.ui.Component)`.
      Parameters:
        `container` - The `SingleComponentContainer` which has to used to display `View` instances
      Returns:
        this

    - #### viewDisplay

          ViewNavigator.Builder viewDisplay(com.vaadin.ui.ComponentContainer container)

      Set the `ComponentContainer` which has to used to display `View` instances, replacing the contents of the ComponentContainer with the active view.
      Parameters:
        `container` - The `ComponentContainer` which has to used to display `View` instances
      Returns:
        this

    - #### buildAndBind

          ViewNavigator buildAndBind(com.vaadin.ui.UI ui)

      Build ViewNavigator instance and bind it to given `ui`
      Parameters:
        `ui` - UI to which to bind the navigator
      Returns:
        ViewNavigator instance

Copyright © 2019 The Holon Platform. All rights reserved.