com.vaadin.navigator.
Interface ViewProvider
-
All Superinterfaces:
All Known Implementing Classes:
Navigator.ClassBasedViewProvider
,Navigator.StaticViewProvider
public interface ViewProvider extends Serializable
A provider for view instances that can return pre-registered views or dynamically create new views. If multiple providers are used,
getViewName(String)
of each is called (in registration order) until one of them returns a non-null value. ThegetView(String)
method of that provider is then used.Since:
7.0
Author:
Vaadin Ltd
-
-
Method Detail
-
getViewName
String getViewName(String viewAndParameters)
Extract the view name from a combined view name and parameter string. This method should return a view name if and only if this provider handles creation of such views.
Parameters:
viewAndParameters
- string with view name and its fragment parameters (if given), not nullReturns:
view name if the view is handled by this provider, null otherwise
-
getView
View getView(String viewName)
Create or return a pre-created instance of a view. The parameters for the view are set separately by the navigator when the view is activated.
Parameters:
viewName
- name of the view, not nullReturns:
newly created view (null if none available for the view name)
-
-