Unlike the deprecated LoginForm in the Vaadin core, this add-on does works for all major browsers and not only for Firefox. Also, it does not load special HTML in an iframe, but you can build your own UI in plain Vaadin, using the components provided by the add-on. In technical terms, the add-on wraps the login UI in an HTML form element that submits a POST request to a dummy resource. The text field for user name and the password field have special attributes so that they are recognized by the password manager.
I have to remove textField.addKeyDownHandler in LoginFormConnector.java, otherwise empty strings are submitted when I hit Enter on the remembered username in Firefox 26. setLoginMode(LoginMode.DEFERRED) did not help.
Can that be fixed?
[/s] Thanks for fixing it.
Ironically, Firefox add-on “Remember Passwords” prevents this add-on from working. I guess it clones an older nsLoginManager.js.
I’m afraid I’m having problems using this add-on. Implementing the code example builds and displays a functional form but the login(String username, String password) method is not called when the login button is pressed. If I was to guess it looks like I need to explicitly wire in a ButtonClickListener in the createContent method but that would seem unlikely - it’s more possible something is not firing correctly in the implementation…
Some additional info on any other features/the API for this add-on would be handy e.g. is there is a facility for password/username field validation or does this need to be implemented separately?
I can imagine that this could happen if you register your own listeners on the text fields. Could that be the case? If not, how does your code look like ?
I don’t have this problem. What browser do you use? On the Javascript console do you see any error messages? Can you submit the form with the enter key?
OK, you’re right. I’ve never tried to hit enter while the auto complete is open. I always hit the tab key. Thanks for reporting this bug, I’ve fixed it in 0.3.2.
I am trying to use this with Weblogic server and I get this error message. Widgetset ‘com.vaadin.DefaultWidgetSet’ does not contain implementation for org.tiaa.cref.ui.forms.LoginForm. Check its component connector’s @Connect mapping, widgetsets GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions.
It seems not possible to use a NativeButton instead of a Button for createLoginButton.
I need a nativebutton because I only want to use an image and don’t want to have the default styling of a plain Button.
The code below allows to login, but I believe it doesn’t work because it will not submit/post the HTML form and thus clicking this button will not have the desired effect (remembering login).
Please note that I have stored userNameField and passwordField as class variables inside createContent(…) because there’s no way to get the username and password otherwise.
protected Button createLoginButton()
{
//return new Button(getLoginButtonCaption());
return new NativeButton("", new ClickListener()
{
private static final long serialVersionUID = 2098963978545270642L;
@Override
public void buttonClick(ClickEvent event)
{
login(userNameField.getValue(), passwordField.getValue());
}
});
}
Could you check if you can fix this (possibly checking explicitly if it is a Button or a NativeButton). I guess there might be other users who want to use a NativeButton for the same styling reasons.
I have “c.v.s.communication.ServerRpcHandler - RPC call to com.ejt.vaadin.loginform.shared.LoginFormRpc.submitCompleted received for connector 5 but no such connector could be found. Resynchronizing client.” warnings in my server log after some logins. Can this be prevented? This happens with Vaadin 7.1.13.