public static interface ViewNavigator.NavigatorBuilder<B extends ViewNavigator.NavigatorBuilder<B>>
ViewNavigator builder| Modifier and Type | Method and Description |
|---|---|
B |
addProvider(com.vaadin.navigator.ViewProvider provider)
Add a
ViewProvider to navigator. |
B |
authenticationEnabled(boolean authenticationEnabled)
Set whether the support for
Authenticate annotation on Views or UI is enabled. |
B |
defaultViewName(String defaultViewName)
Set the default view name.
|
B |
defaultViewWindowConfigurator(Consumer<ViewWindowConfigurator> configurator)
Set the default
ViewWindowConfigurator consumer to used for all the view Windows created by this
navigator. |
B |
errorView(com.vaadin.navigator.View errorView)
Set the view to be displayed when no other view matches the navigation state.
|
B |
errorViewProvider(com.vaadin.navigator.ViewProvider errorViewProvider)
Registers a view provider that is queried for a view when no other view matches the navigation state.
|
B |
maxNavigationHistorySize(int maxSize)
Set navigation history max size
|
B |
navigateToDefaultViewWhenViewNotAvailable(boolean navigateToDefaultViewWhenViewNotAvailable)
Set whether to navigate to default view (if setted) when a view is not available from current navigation
state
|
B |
withViewChangeListener(com.vaadin.navigator.ViewChangeListener viewChangeListener)
Add a
ViewChangeListener to Navigator |
B maxNavigationHistorySize(int maxSize)
maxSize - Max size of retained navigation statesB addProvider(com.vaadin.navigator.ViewProvider provider)
ViewProvider to navigator. Providers are called in order of registration until one that can
handle the requested view name is found.provider - View provider to add (not null)B defaultViewName(String defaultViewName)
View with given defaultViewName is valid and provided by
registered ViewProviders, it is used as target of ViewNavigator.navigateToDefault() method and as a
fallback by ViewNavigator.navigateBack() method if no other View is available in history.defaultViewName - the default view name to setB navigateToDefaultViewWhenViewNotAvailable(boolean navigateToDefaultViewWhenViewNotAvailable)
navigateToDefaultViewWhenViewNotAvailable - true to navigate to default view (if setted)
when a view is not available from current navigation stateB defaultViewWindowConfigurator(Consumer<ViewWindowConfigurator> configurator)
ViewWindowConfigurator consumer to used for all the view Windows created by this
navigator.configurator - View window configuratorB errorView(com.vaadin.navigator.View errorView)
errorView - Error viewB errorViewProvider(com.vaadin.navigator.ViewProvider errorViewProvider)
getViewName(String navigationState) should return navigationState.errorViewProvider - Error view providerB withViewChangeListener(com.vaadin.navigator.ViewChangeListener viewChangeListener)
ViewChangeListener to NavigatorviewChangeListener - ViewChangeListener to addB authenticationEnabled(boolean authenticationEnabled)
Authenticate annotation on Views or UI is enabled.
If enabled, the navigator will check the Authenticate annotation on Views or UI
during navigation, and if present, requires the presence of an authenticated AuthContext obtained
through AuthContext.getCurrent(). If an AuthContext is present but not authenticated, try to
perform authentication using current VaadinRequest and the optional authentication schemes specified
using Authenticate.schemes(). If the authentication is not successfull and a valid redirect URI is
provided through Authenticate.redirectURI(), the navigation is redirected to that URI. If the URI
does not specify a scheme, or the scheme is equal to view://, the navigation is redirected to
the navigation state following the view:// scheme or to the navigation state equal to the
Authenticate.redirectURI() attribute if a URI scheme is not specified.
The authentication support is enabled by default.
authenticationEnabled - true to enable the Authenticate support, false
to disable.Copyright © 2019 The Holon Platform. All rights reserved.