ScreenFacet is a facet that provides an ability to pre-configure screen opening and passing properties. Declarative definition of the screen replaces existing ScreenBuilders.screen() method. ScreenFacet is defined in the facets element of the screen XML descriptor.

Component’s XML-name: screen.

Usage example:

    <screen id="testScreen"
            <property name="num" value="42"/>

The screen configured with ScreenFacet can be shown explicitly using the show() method:

protected ScreenFacet testScreen;

public void onShowDialogClick(Button.ClickEvent event) {

Alternatively, the facet can be subscribed to any action (see onAction attribute) or button (see onButton attribute) by id.

ScreenFacet has the following attributes:

  • screenId – specifies the id of the screen to open.

  • screenClass – Java class of the screen controller to open.

  • openMode – screen open mode, corresponds to the OpenMode enum: NEW_TAB, DIALOG, NEW_WINDOW, ROOT, THIS_TAB. The default value is NEW_TAB.

ScreenFacet has the properties element, which represents a list of properties, that will be injected into the opened screen via public setters. See Passing parameters to screens.

Attributes of screen

id - onAction - onButton - openMode - screenClass - screenId

Element of screen