3.5.4.10. LookupScreenFacet

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

Component’s XML-name: lookupScreen.

Usage example:

<lookupScreen id="userLookup"
              openMode="DIALOG"
              entityClass="com.haulmont.cuba.security.entity.User"
              listComponent="usersTable"
              field="pickerField"
              container="userDc"
              onAction="lookupAction"/>

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

@Inject
protected LookupScreenFacet userLookup;

@Subscribe("showDialog")
public void onShowDialogClick(Button.ClickEvent event) {
    userLookup.show();
}

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


Attributes of lookupScreen

container - entityClass - field - id - listComponent - onAction - onButton - openMode - screenClass - screenId

Element of lookupScreen

properties