Class ChangePasswordView

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<T>
io.jmix.flowui.view.View<ViewLayout>
io.jmix.flowui.view.StandardView
io.jmix.securityflowui.view.changepassword.ChangePasswordView
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.router.AfterNavigationObserver, com.vaadin.flow.router.BeforeEnterObserver, com.vaadin.flow.router.BeforeLeaveObserver, com.vaadin.flow.router.HasDynamicTitle, com.vaadin.flow.router.internal.AfterNavigationHandler, com.vaadin.flow.router.internal.BeforeEnterHandler, com.vaadin.flow.router.internal.BeforeLeaveHandler, Serializable

@ViewController("changePasswordView") @ViewDescriptor("change-password-view.xml") @DialogMode(width="AUTO", height="AUTO") public class ChangePasswordView extends StandardView
See Also:
  • Field Details

    • passwordField

      @ViewComponent protected com.vaadin.flow.component.textfield.PasswordField passwordField
    • confirmPasswordField

      @ViewComponent protected com.vaadin.flow.component.textfield.PasswordField confirmPasswordField
    • currentPasswordField

      @ViewComponent protected com.vaadin.flow.component.textfield.PasswordField currentPasswordField
    • messageBundle

      @Autowired protected MessageBundle messageBundle
    • userManager

      @Autowired protected UserManager userManager
    • notifications

      @Autowired protected Notifications notifications
    • viewValidation

      @Autowired protected ViewValidation viewValidation
    • passwordEncoder

      @Autowired protected org.springframework.security.crypto.password.PasswordEncoder passwordEncoder
    • passwordValidation

      @Autowired protected PasswordValidation passwordValidation
    • userRepository

      @Autowired protected UserRepository userRepository
    • metadataTools

      @Autowired protected MetadataTools metadataTools
    • username

      protected String username
    • user

      protected org.springframework.security.core.userdetails.UserDetails user
  • Constructor Details

    • ChangePasswordView

      public ChangePasswordView()
  • Method Details

    • getUsername

      public String getUsername()
      Returns:
      username for which should be changed password
    • setUsername

      public void setUsername(String username)
      Sets username for which should be changed password.
      Parameters:
      username - username
    • isCurrentPasswordRequired

      public boolean isCurrentPasswordRequired()
      Returns:
      true if a user should enter the current password
    • setCurrentPasswordRequired

      public void setCurrentPasswordRequired(boolean required)
      Sets whether a user should enter the current password.

      Default value is false.

      Parameters:
      required - required option
    • onBeforeShow

      @Subscribe public void onBeforeShow(View.BeforeShowEvent event)
    • getPageTitle

      public String getPageTitle()
      Specified by:
      getPageTitle in interface com.vaadin.flow.router.HasDynamicTitle
      Overrides:
      getPageTitle in class View<ViewLayout>
    • onSaveActionPerformed

      @Subscribe("saveAction") public void onSaveActionPerformed(ActionPerformedEvent event)
    • onCloseActionPerformed

      @Subscribe("closeAction") public void onCloseActionPerformed(ActionPerformedEvent event)
    • validate

      protected boolean validate()
    • validatePassword

      protected ValidationErrors validatePassword(com.vaadin.flow.component.textfield.PasswordField passwordField, com.vaadin.flow.component.textfield.PasswordField confirmPasswordField, com.vaadin.flow.component.textfield.PasswordField currentPasswordField)
    • changePassword

      protected OperationResult changePassword(String username, String password, @Nullable String currentPassword)
    • getPassword

      @Nullable protected String getPassword()