@UIScope public class SpringNavigator extends com.vaadin.navigator.Navigator
SpringViewProvider and allows
late initialization.com.vaadin.navigator.Navigator.ClassBasedViewProvider, com.vaadin.navigator.Navigator.ComponentContainerViewDisplay, com.vaadin.navigator.Navigator.EmptyView, com.vaadin.navigator.Navigator.SingleComponentContainerViewDisplay, com.vaadin.navigator.Navigator.StaticViewProvider, com.vaadin.navigator.Navigator.UriFragmentManager| Constructor and Description |
|---|
SpringNavigator() |
SpringNavigator(com.vaadin.ui.UI ui,
com.vaadin.ui.ComponentContainer container) |
SpringNavigator(com.vaadin.ui.UI ui,
com.vaadin.navigator.NavigationStateManager stateManager,
com.vaadin.navigator.ViewDisplay display) |
SpringNavigator(com.vaadin.ui.UI ui,
com.vaadin.ui.SingleComponentContainer container) |
SpringNavigator(com.vaadin.ui.UI ui,
com.vaadin.navigator.ViewDisplay display) |
| Modifier and Type | Method and Description |
|---|---|
void |
addViewActivationListener(ViewActivationListener listener)
Adds a listener on view activation
|
protected org.springframework.context.ApplicationContext |
getWebApplicationContext() |
void |
init(com.vaadin.ui.UI ui,
com.vaadin.ui.ComponentContainer container)
Initializes an injected navigator and registers
SpringViewProvider for it. |
void |
init(com.vaadin.ui.UI ui,
com.vaadin.navigator.NavigationStateManager stateManager,
com.vaadin.navigator.ViewDisplay display)
The
SpringViewProvider bean from the context is automatically
registered for the navigator. |
void |
init(com.vaadin.ui.UI ui,
com.vaadin.ui.SingleComponentContainer container)
Initializes an injected navigator and registers
SpringViewProvider for it. |
void |
init(com.vaadin.ui.UI ui,
com.vaadin.navigator.ViewDisplay display)
Initializes an injected navigator and registers
SpringViewProvider for it. |
void |
removeViewActivationListener(ViewActivationListener listener)
Removes a listener on view activation
|
void |
setErrorView(Class<? extends com.vaadin.navigator.View> viewClass)
Registers a view class for the view to show when no other view matches
the navigation state.
|
protected void |
switchView(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent event) |
addProvider, addView, addView, addViewChangeListener, beforeViewChange, destroy, fireAfterViewChange, fireBeforeViewChange, getCurrentView, getDisplay, getState, getStateManager, getUI, navigateTo, navigateTo, removeProvider, removeView, removeViewChangeListener, revertNavigation, setErrorProvider, setErrorView, updateNavigationStatepublic SpringNavigator()
public SpringNavigator(com.vaadin.ui.UI ui,
com.vaadin.ui.ComponentContainer container)
public SpringNavigator(com.vaadin.ui.UI ui,
com.vaadin.navigator.NavigationStateManager stateManager,
com.vaadin.navigator.ViewDisplay display)
public SpringNavigator(com.vaadin.ui.UI ui,
com.vaadin.ui.SingleComponentContainer container)
public SpringNavigator(com.vaadin.ui.UI ui,
com.vaadin.navigator.ViewDisplay display)
public void addViewActivationListener(ViewActivationListener listener)
listener - public void removeViewActivationListener(ViewActivationListener listener)
listener - protected void switchView(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent event)
switchView in class com.vaadin.navigator.Navigatorpublic void init(com.vaadin.ui.UI ui,
com.vaadin.ui.ComponentContainer container)
SpringViewProvider for it.
The default navigation state manager (based on URI fragments) is used.
Navigation is automatically initiated after UI.init() if a
navigator was created. If at a later point changes are made to the
navigator, navigator.navigateTo(navigator.getState()) may need to
be explicitly called to ensure the current view matches the navigation
state.
ui - The UI to which this Navigator is attached.container - The component container used to display the views handled by
this navigatorpublic void init(com.vaadin.ui.UI ui,
com.vaadin.ui.SingleComponentContainer container)
SpringViewProvider for it.
The default navigation state manager (based on URI fragments) is used.
Navigation is automatically initiated after UI.init() if a
navigator was created. If at a later point changes are made to the
navigator, navigator.navigateTo(navigator.getState()) may need to
be explicitly called to ensure the current view matches the navigation
state.
ui - The UI to which this Navigator is attached.container - The single component container used to display the views
handled by this navigatorpublic void init(com.vaadin.ui.UI ui,
com.vaadin.navigator.ViewDisplay display)
SpringViewProvider for it.
The default navigation state manager (based on URI fragments) is used.
Navigation is automatically initiated after UI.init() if a
navigator was created. If at a later point changes are made to the
navigator, navigator.navigateTo(navigator.getState()) may need to
be explicitly called to ensure the current view matches the navigation
state.
ui - The UI to which this Navigator is attached.display - The ViewDisplay used to display the views handled by this
navigatorpublic void init(com.vaadin.ui.UI ui,
com.vaadin.navigator.NavigationStateManager stateManager,
com.vaadin.navigator.ViewDisplay display)
SpringViewProvider bean from the context is automatically
registered for the navigator.init in class com.vaadin.navigator.Navigatorpublic void setErrorView(Class<? extends com.vaadin.navigator.View> viewClass)
Navigator.setErrorProvider(ViewProvider) call.
A bean of the given type is fetched on demand from the application
context to be used as the error view. As a fallback mechanism for
backwards compatibility, Class.newInstance() is used if no such
bean is found.
Note that an error view bean must be UI or prototype scoped.
setErrorView in class com.vaadin.navigator.NavigatorviewClass - The View class whose instance should be used as the error
view.protected org.springframework.context.ApplicationContext getWebApplicationContext()
Copyright © 2017 Vaadin Ltd. All Rights Reserved.