com.vaadin.navigator
Interface ViewProvider

All Superinterfaces:
Serializable
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. The getView(String) method of that provider is then used.

Since:
7.0
Author:
Vaadin Ltd

Method Summary
 View getView(String viewName)
          Create or return a pre-created instance of a view.
 String getViewName(String viewAndParameters)
          Extract the view name from a combined view name and parameter string.
 

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 null
Returns:
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 null
Returns:
newly created view (null if none available for the view name)


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.