Implementation of the generic user interface of the Web Client block is based on the Vaadin framework. The main classes available in the web client infrastructure are described below.
-
App- the central class of the application infrastructure. Contains links toConnection,AppWindowand other infrastructure objects. Only one instance ofAppexists for a given HTTP-session.Each application typically has its own
Appclass class inherited from theDefaultAppand thus from the basic abstractAppclass of the platform. It allows you to overridecreateAppWindow()andcreateLoginWindow()methods to create custom implementations of the main window and the login window.The
Appclass of an application should be registered in theapplicationparameter of theapp_servletin the web.xml file of the web module. -
Connectionis the interface providing functionality of connecting to middleware and storing user sessions.DefaultConnectionis a standard implementation of this interface. -
AppUIis a platform class inherited fromcom.vaadin.ui.UIclass. There is one instance of this class for each open tab of a web browser. Contains a link to theUIViewobject – either aLoginWindoworAppWindow.AppUIapplication class should be registered in theUIparameter of theapp_servletin theweb/WEB-INF/web.xmlfile of the web module. In most cases, standard platform class is used. -
LoginWindow– the window displayed before a user logs in. In your application you can create an inheritor ofLoginWindowand redefine thecreateLoginWindow()method of theAppclass to use it. -
AppWindow– main application window displayed after a user logs in. In your application, you can create an inheritor ofAppWindowand override thecreateAppWindow()method of theAppclass to use it.onHistoryBackPerformed()method allows you to handle browser button. This method is invoked instead of standard browser behavior if cuba.web.allowHandleBrowserHistoryBack application property is true.You can control certain main window parameters without creating
AppWindowinheritor, using the following application properties:-
cuba.web.useLightHeader - switches on compact window header - logo, menu bar, user name and log out button in one line. When switched off,
AppWindow.createTitleLayout()method creates additional area at the top. -
cuba.web.foldersPaneEnabled - allows creation of folders pane by
AppWindow.createFoldersPane()method. -
cuba.web.appWindowMode – sets default mode for the main window: tabbed or single screen (
TABBEDorSINGLE). Users can change the mode later using > screen. -
cuba.web.maxTabCount – when the main window is in the tabbed mode, this property sets the maximum number of tabs that a user can open. The default value is 7.
-
-
WindowManager- the central class implementing application screens management logic.openWindow(),openEditor(),showMessageDialog()and other methods of theIFrameinterface implemented by screen controllers delegate to the window manager.WindowManagerclass is located in the platform’s common gui module and is abstract. The web module has a dedicatedWebWindowManagerclass that implements web client specifics.Normally, the
WindowManageris not used in the application code directly. -
ExceptionHandlers- contains a collection of client-level exception handlers.


