Package 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
      • getUsernameCaption

        public java.lang.String getUsernameCaption()
        Gets the caption set with setUsernameCaption(String). Note that this method might not match what is shown to the user if createUsernameField() has been overridden.
        Returns:
        the user name field caption
      • setUsernameCaption

        public void setUsernameCaption​(java.lang.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
      • getPasswordCaption

        public java.lang.String getPasswordCaption()
        Gets the caption set with setPasswordCaption(String). Note that this method might not match what is shown to the user if createPasswordField() has been overridden.
        Returns:
        the password field caption
      • setPasswordCaption

        public void setPasswordCaption​(java.lang.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
      • getLoginButtonCaption

        public java.lang.String getLoginButtonCaption()
        Gets the caption set with setLoginButtonCaption(String). Note that this method might not match what is shown to the user if createLoginButton() has been overridden.
        Returns:
        the login button caption
      • setLoginButtonCaption

        public void setLoginButtonCaption​(java.lang.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 com.vaadin.shared.ui.loginform.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 com.vaadin.shared.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