public class ApplicationFrame extends Object implements Serializable
| Constructor and Description |
|---|
ApplicationFrame() |
| Modifier and Type | Method and Description |
|---|---|
protected com.vaadin.navigator.Navigator |
createNavigator(com.vaadin.ui.UI ui,
com.vaadin.ui.ComponentContainer componentContainer) |
com.vaadin.ui.VerticalLayout |
getContent()
Returns the vertical layout that displays all content.
|
Optional<com.vaadin.ui.Component> |
getCurrentView()
Returns the view that is currently displayed if there is any.
|
protected com.vaadin.ui.VerticalLayout |
getMainArea() |
protected com.vaadin.navigator.Navigator |
getNavigator() |
protected com.vaadin.navigator.ViewProvider |
getViewProvider() |
void |
init(com.vaadin.ui.UI ui)
Initializes the layout for the given UI.
|
void |
refreshCurrentView()
Navigates to the same view as the current view.
|
<T extends com.vaadin.navigator.View> |
showView(Class<T> clazz)
Attempts to show a view of the given class.
|
<T extends com.vaadin.navigator.View> |
showView(Class<T> clazz,
String pathAndParameters)
Attempts to show a view of the given class, appending pathAndParameters to the URL to provide
information to the called view.
|
public void init(com.vaadin.ui.UI ui)
Can't be done in a layout's constructor as we need the other beans to be injected and also the UI which is still under construction at this point in time.
protected com.vaadin.navigator.Navigator createNavigator(com.vaadin.ui.UI ui,
com.vaadin.ui.ComponentContainer componentContainer)
protected com.vaadin.ui.VerticalLayout getMainArea()
protected com.vaadin.navigator.ViewProvider getViewProvider()
protected com.vaadin.navigator.Navigator getNavigator()
public com.vaadin.ui.VerticalLayout getContent()
init(UI) method before calling this method.public <T extends com.vaadin.navigator.View> void showView(Class<T> clazz)
Note that navigation to a view might not be performed if there is a
ViewChangeListener that prohibits the
navigation. Thus there is no guarantee that a view of the given class is displayed after this
method returns.
public <T extends com.vaadin.navigator.View> void showView(Class<T> clazz, String pathAndParameters)
Note that navigation to a view might not be performed if there is a
ViewChangeListener that prohibits the
navigation. Thus there is no guarantee that a view of the given class is displayed after this
method returns.
pathAndParameters - a string containing an URL-Like path as well as URL parameters. Must
not start with "/". Example:
"part1/part2/arg1=23&arg2=42".public Optional<com.vaadin.ui.Component> getCurrentView()
public void refreshCurrentView()
ViewScoped of dependency injection but will keep the
UIScoped. As long as all your state is in UIScoped objects you can call this
method to reload the whole UI while keeping current state.
Note: You will get two Page.UriFragmentChangedEvent because we switch to the
EmptyCdiView and back to the current view!
Copyright © 2017. All rights reserved.