Class AbstractLogin

    • Constructor Detail

      • AbstractLogin

        public AbstractLogin()
        Initializes a new AbstractLogin with a default localization.
      • AbstractLogin

        public AbstractLogin​(LoginI18n i18n)
        Initializes a new AbstractLogin.
        Parameters:
        i18n - internationalized messages to be used by this instance.
    • Method Detail

      • setAction

        public void setAction​(String action)
        Sets the path where to send the form-data when a form is submitted. Once action is defined a AbstractLogin.LoginEvent is not fired anymore.
        See Also:
        getAction()
      • getAction

        @Synchronize(property="action",
                     value="action-changed")
        public String getAction()
        Returns the action defined for a login form.
        Returns:
        the value of action property
      • setError

        public void setError​(boolean error)
        Sets whether to show or hide the error message. The message can be set via setI18n(LoginI18n) Calling this method with true will also enable the component.
        Parameters:
        error - true to show the error message and enable component for next login attempt, false to hide an error
        See Also:
        isError()
      • isError

        @Synchronize(property="error",
                     value="error-changed")
        public boolean isError()
        Returns whether the error message is displayed or not
        Returns:
        the value of error property
      • setForgotPasswordButtonVisible

        public void setForgotPasswordButtonVisible​(boolean forgotPasswordButtonVisible)
        Sets whether to show or hide the forgot password button. The button is visible by default
        Parameters:
        forgotPasswordButtonVisible - whether to display or hide the button
        See Also:
        isForgotPasswordButtonVisible()
      • isForgotPasswordButtonVisible

        public boolean isForgotPasswordButtonVisible()
        Returns whether the forgot password button is visible or not
        Returns:
        true if the forgot password button is visible false otherwise
      • setI18n

        public void setI18n​(LoginI18n i18n)
        Sets the internationalized messages to be used by this instance.
        Parameters:
        i18n - the internationalized messages
        See Also:
        LoginI18n.createDefault()
      • onEnabledStateChanged

        public void onEnabledStateChanged​(boolean enabled)
        Description copied from class: Component
        Handle component enable state when the enabled state changes.

        By default this sets or removes the 'disabled' attribute from the element. This can be overridden to have custom handling.

        Overrides:
        onEnabledStateChanged in class Component
        Parameters:
        enabled - the new enabled state of the component