Class LoginOverlay

  • All Implemented Interfaces:
    com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasStyle, Serializable

    @Tag("vaadin-login-overlay")
    @NpmPackage(value="@vaadin/polymer-legacy-adapter",version="23.5.12") @NpmPackage(value="@vaadin/login",version="23.5.12") @NpmPackage(value="@vaadin/vaadin-login",version="23.5.12")
    @JsModule("@vaadin/polymer-legacy-adapter/style-modules.js") @JsModule("@vaadin/login/src/vaadin-login-overlay.js") @JsModule("./loginOverlayConnector.js")
    public class LoginOverlay
    extends AbstractLogin
    implements com.vaadin.flow.component.HasStyle
    Server-side component for the <vaadin-login-overlay> component. On AbstractLogin.LoginEvent component becomes disabled. Disabled component stops to process login events, however the AbstractLogin.ForgotPasswordEvent event is processed anyway. To enable use the HasEnabled.setEnabled(boolean) method. Setting error AbstractLogin.setError(boolean) true makes component automatically enabled for the next login attempt.
    Author:
    Vaadin Ltd
    See Also:
    Serialized Form
    • Constructor Detail

      • LoginOverlay

        public LoginOverlay()
      • LoginOverlay

        public LoginOverlay​(LoginI18n i18n)
    • Method Detail

      • close

        public void close()
        Closes the login overlay.

        Note: This method also removes the overlay component from the DOM after closing it, unless you have added the component manually.

      • isOpened

        @Synchronize(property="opened",
                     value="opened-changed")
        public boolean isOpened()
      • setOpened

        public void setOpened​(boolean opened)
        Opens or closes the login overlay. On open component becomes enabled HasEnabled.setEnabled(boolean)

        Note: Overlay will be attached or detached from the DOM automatically, if it was not added manually.

        Parameters:
        opened - true to open the login overlay, false to close it
      • setTitle

        public void setTitle​(String title)
        Sets the application title. Detaches the component title if it was set earlier. Note: the method calls setTitle(Component), which will reset the custom title, if it was set. Custom title can be reset only when the overlay is closed. Title is a part of the I18n object. See AbstractLogin.setI18n(LoginI18n).
        See Also:
        getTitleAsText()
      • getTitleAsText

        @Synchronize(property="title",
                     value="title-changed")
        public String getTitleAsText()
        Returns the value of the title property or a text content of the title if it was set via setTitle(Component)
        Returns:
        the string value of title
      • setTitle

        public void setTitle​(com.vaadin.flow.component.Component title)
        Sets the application title, null to remove any previous title and to display title set via setTitle(String). Note: the title component has to be set when the overlay is closed.
        Parameters:
        title - the title component to set, or null to remove any previously set title
        See Also:
        getTitle()
      • getTitle

        public com.vaadin.flow.component.Component getTitle()
        Returns custom title component which was set via setTitle(Component)
        Returns:
        the title component, null if nothing was set
      • getDescription

        @Synchronize(property="description",
                     value="description-changed")
        public String getDescription()
        Returns:
        the value of description property
      • getStyle

        public com.vaadin.flow.dom.Style getStyle()
        Specified by:
        getStyle in interface com.vaadin.flow.component.HasStyle
        Throws:
        UnsupportedOperationException - LoginOverlay does not support adding styles to overlay wrapper
      • onAttach

        protected void onAttach​(com.vaadin.flow.component.AttachEvent attachEvent)
        Overrides:
        onAttach in class com.vaadin.flow.component.Component