I am trying to go through the bakery app java code. In its LoginView constructor, there is a call to setForgotPasswordButtonVisible(true), but when I go to the login screen there is no “Forgot password button” displayed. The forgot password button is also not displayed in [demo]
(https://bakery-flow.demo.vaadin.com/login). I am trying to learn the framework. Can anyone please help?
Thanks
Try the following:
LoginForm loginForm = new LoginForm();
private LoginI18n i18n = LoginI18n.createDefault();
..
...
public LoginScreen() {
...
loginForm.setForgotPasswordButtonVisible(true);
Form form = new Form();
form.setTitle("Log in");
form.setUsername("Username");
form.setPassword("Password");
form.setSubmit("Log in");
form.setForgotPassword("Forgot");
i18n.setForm(form);
loginForm.setI18n(i18n);
}
It seems that if you don’t set the “String” of what the button should say, the space is there, the button is created but its empty …