I’m trying to access the filled in username in the form of com.vaadin.flow.component.login.LoginOverlay.LoginOverlay
when clicking ‘Forgot password’.
In the login listener I can access it from the fired event, but in the forgot password listener I can’t. I can’t access the username field directly from the LoginOverlay component either, so what is the recommended approach to retrieve the value?
This is my handler where I want to access the username:
@Override
public void handleForgotPassword(ForgotPasswordEvent event) {
// fetch username here
}
This is called by declaring: loginOverlay.addForgotPasswordListener(loginPresenter::handleForgotPassword);