public static interface ViewNavigator.Builder extends ViewNavigator.NavigatorBuilder<ViewNavigator.Builder>
ViewNavigator
instancesModifier 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. |
addProvider, authenticationEnabled, defaultViewName, defaultViewNavigationStrategy, defaultViewWindowConfigurator, errorView, errorViewProvider, maxNavigationHistorySize, navigateToDefaultViewWhenViewNotAvailable, viewClassProvider, withViewChangeListener
ViewNavigator.Builder withView(String viewName, Class<? extends com.vaadin.navigator.View> viewClass)
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.
viewName
- View name (not null)viewClass
- View class (not null)ViewNavigator.Builder navigationStateManager(com.vaadin.navigator.NavigationStateManager navigationStateManager)
navigationStateManager
- NavigationStateManager or null
to use the default implementationViewNavigator.Builder viewDisplay(com.vaadin.navigator.ViewDisplay viewDisplay)
View
instancesviewDisplay
- The ViewDisplayViewNavigator.Builder viewDisplay(com.vaadin.ui.SingleComponentContainer container)
SingleComponentContainer
which has to used to display View
instances using
SingleComponentContainer.setContent(com.vaadin.ui.Component)
.container
- The SingleComponentContainer
which has to used to display View
instancesViewNavigator.Builder viewDisplay(com.vaadin.ui.ComponentContainer container)
ComponentContainer
which has to used to display View
instances, replacing the
contents of the ComponentContainer with the active view.container
- The ComponentContainer
which has to used to display View
instancesViewNavigator buildAndBind(com.vaadin.ui.UI ui)
ui
ui
- UI to which to bind the navigatorCopyright © 2018 The Holon Platform. All rights reserved.