|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.server.AbstractUIProvider
public abstract class AbstractUIProvider
| Constructor Summary | |
|---|---|
AbstractUIProvider()
|
|
| Method Summary | ||
|---|---|---|
UI |
createInstance(WrappedRequest request,
java.lang.Class<? extends UI> type)
|
|
protected static
|
getAnnotationFor(java.lang.Class<?> type,
java.lang.Class<T> annotationType)
Helper to get an annotation for a class. |
|
UI |
getExistingUI(WrappedRequest request)
Finds an existing UI for a request. |
|
java.lang.String |
getPageTitle(WrappedRequest request,
java.lang.Class<? extends UI> uiClass)
|
|
java.lang.String |
getTheme(WrappedRequest request,
java.lang.Class<? extends UI> uiClass)
Finds the theme to use for a specific UI. |
|
java.lang.String |
getWidgetset(WrappedRequest request,
java.lang.Class<? extends UI> uiClass)
Finds the widgetset to use for a specific UI. |
|
boolean |
isPreservedOnRefresh(WrappedRequest request,
java.lang.Class<? extends UI> uiClass)
Checks whether the same UI state should be reused if the framework can detect that the application is opened in a browser window where it has previously been open. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.vaadin.server.UIProvider |
|---|
getUIClass |
| Constructor Detail |
|---|
public AbstractUIProvider()
| Method Detail |
|---|
public UI createInstance(WrappedRequest request,
java.lang.Class<? extends UI> type)
createInstance in interface UIProvider
protected static <T extends java.lang.annotation.Annotation> T getAnnotationFor(java.lang.Class<?> type,
java.lang.Class<T> annotationType)
type - the target class from which the annotation should be foundannotationType - the annotation type to look for
null if the
annotation is not present on the class
public java.lang.String getTheme(WrappedRequest request,
java.lang.Class<? extends UI> uiClass)
UIProvidernull is returned.
TODO Tell what the default implementation does once it does something.
getTheme in interface UIProvidernull if the default theme
should be used
public java.lang.String getWidgetset(WrappedRequest request,
java.lang.Class<? extends UI> uiClass)
UIProvidernull is returned.
The default implementation uses the @Widgetset annotation if it's
defined for the UI class.
getWidgetset in interface UIProviderrequest - the wrapped request for which to get a widgetsetuiClass - the UI class to get a widgetset for
null if the default
widgetset should be used
public boolean isPreservedOnRefresh(WrappedRequest request,
java.lang.Class<? extends UI> uiClass)
UIProvider
isPreservedOnRefresh in interface UIProvidertrueif the same UI instance should be reused e.g.
when the browser window is refreshed.
public java.lang.String getPageTitle(WrappedRequest request,
java.lang.Class<? extends UI> uiClass)
getPageTitle in interface UIProviderpublic UI getExistingUI(WrappedRequest request)
UIProviderUI for a request.
Implementations should take care to not return an UI instance that might be used in some other browser as that might cause synchronization issues when changes from one browser window are not present in the other.
If no UI provider returns an existing UI, the framework does also check
the window.name for an existing instance with
UIProvider.isPreservedOnRefresh(WrappedRequest, Class) before falling back to
bootstrapping and creating a new UI instance.
getExistingUI in interface UIProviderrequest - the request for which a UI is desired
null if this UI
provider doesn't have an existing UI for the request.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||