com.vaadin.ui.

Class LoginForm

    • Constructor Detail

      • LoginForm

        public LoginForm()
    • Method Detail

      • createUsernameField

        protected TextField createUsernameField()

        Customize the user name field. Only for overriding, do not call.

        Returns:

        the user name field

        Since:

        7.7

      • setUsernameCaption

        public void setUsernameCaption​(String usernameCaption)

        Sets the caption of the user name field. Note that the caption can only be set with this method before the login form has been initialized (attached).

        As an alternative to calling this method, the method createUsernameField() can be overridden.

        Parameters:

        usernameCaption - the caption to set for the user name field

      • createPasswordField

        protected PasswordField createPasswordField()

        Customize the password field. Only for overriding, do not call.

        Returns:

        the password field

        Since:

        7.7

      • setPasswordCaption

        public void setPasswordCaption​(String passwordCaption)

        Set the caption of the password field. Note that the caption can only be set with this method before the login form has been initialized (attached).

        As an alternative to calling this method, the method createPasswordField() can be overridden.

        Parameters:

        passwordCaption - the caption for the password field

      • createLoginButton

        protected Button createLoginButton()

        Customize the login button. Only for overriding, do not call.

        Returns:

        the login button

        Since:

        7.7

      • setLoginButtonCaption

        public void setLoginButtonCaption​(String loginButtonCaption)

        Sets the caption of the login button. Note that the caption can only be set with this method before the login form has been initialized (attached).

        As an alternative to calling this method, the method createLoginButton() can be overridden.

        Parameters:

        loginButtonCaption - new caption

      • getState

        protected LoginFormState getState()

        Description copied from class: AbstractComponent

        Returns the shared state bean with information to be sent from the server to the client. Subclasses should override this method and set any relevant fields of the state returned by super.getState().

        Overrides:

        getState in class AbstractSingleComponentContainer

        Returns:

        updated component shared state

      • addLoginListener

        public Registration addLoginListener​(LoginForm.LoginListener listener)

        Adds a LoginForm.LoginListener.

        The listener is called when the user presses the login button.

        Parameters:

        listener - the listener to add

        Returns:

        a registration object for removing the listener

        Since:

        8.0