3.5.18. Generic UI Infrastructure
This section describes Generic UI infrastructure classes that can be extended in an application.
-
AppUI
is a class inherited fromcom.vaadin.ui.UI
. There is one instance of this class for each open web browser tab. It refers aRootWindow
which contains either a login screen or main screen, depending on the connection state. You can get a reference to theAppUI
for the current browser tab by using theAppUI.getCurrent()
static method.If you want to customize functionality of
AppUI
in your project, create a class extendingAppUI
in the web module and register it in web-spring.xml withcuba_AppUI
id andprototype
scope, for example:<bean id="cuba_AppUI" class="com.company.sample.web.MyAppUI" scope="prototype"/>
-
Connection
is an interface providing functionality of connecting to middleware and holding a user session.ConnectionImpl
is a standard implementation of this interface.If you want to customize functionality of
Connection
in your project, create a class extendingConnectionImpl
in the web module and register it in web-spring.xml withcuba_Connection
id andvaadin
scope, for example:<bean id="cuba_Connection" class="com.company.sample.web.MyConnection" scope="vaadin"/>
-
ExceptionHandlers
class contains a collection of client-level exception handlers. -
App
contains links toConnection
,ExceptionHandlers
and other infrastructure objects. A single instance of this class is created for an HTTP session and stored in its attribute. You can get a reference to theApp
instance by using theApp.getInstance()
static method.If you want to customize functionality of
App
in your project, create a class extendingDefaultApp
in the web module and register it in web-spring.xml withcuba_App
id andvaadin
scope, for example:<bean name="cuba_App" class="com.company.sample.web.MyApp" scope="vaadin"/>