[b]
What you can read below is beginner’s guide to setting up an addon,
which can help if you have never done it before.
IMPORTANT: There is no problem with the Loginform addon. It is not the addon’s responsibility
to set the widgetset. The widgetset error arises from the lack of knowledge on the user’s part.
[/b]
This might be useful for other beginners. Solution for the widgetset error:
Widgetset ‘com.vaadin.DefaultWidgetSet’ does not contain implementation for com.ejt.vaadin.loginform.DefaultVerticalLoginForm."…
Setting up the loginform addon step-by-step
add the following to ivx.xml, after which ivy successfully fetched loginform
<dependency
org="org.vaadin.addons"
name="loginform"
rev="0.5.1" />
2. add some example code to the UI’s
init method:[code]
protected void init(VaadinRequest request) {
final VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
setContent(layout);
DefaultVerticalLoginForm loginForm = new DefaultVerticalLoginForm();
loginForm.addLoginListener(new LoginListener() {
@Override
public void onLogin(LoginEvent event) {
System.err.println(
"Logged in with user name " + event.getUserName() +
" and password of length " + event.getPassword().length());
}
});
layout.addComponent(loginForm);
}
[/code]3. click on the
Compile Widgetset icon:
4. go to
WebContent/VAADIN/widgetsets , here you will see a directory starting with you namespace, in my case the name of the directory is was
com.example.vaadintest.widgetset.VaadintestWidgetset . Add this name as a @Widgetset annotation to the UI class.
@Widgetset("com.example.vaadintest.widgetset.VaadintestWidgetset")
public class VaadintestUI extends UI {
5. Select
Project → clean, wait for recompilation
6. Go to the
Servers tab and click
Restart the server in debug mode
Yes, I know. Sorry for not making it clear. I have edited the post. Also, I am not asking for help, just describing how to solve the widgetset error for others if they are new to using addons.
I’ve got the same problem. My workaround was to download the jar manually and put it in my local Maven repository. Still, I hope that the Vaadin guys can fix this quickly.
They say that the maven server is OK and that 0.5.1 can be downloaded by maven. It might by a problem if you try to get it from a maven repository other than the official one for add-ons.
I make a simple application with your sample of “DefaultVerticalLoginForm”, and it works on my pc on Chrome and Safari, but I want used my web application on my Ipad. And in my Ipad, the login and the password are really saved but not the autofill.
I want launch the autofill login and password automatically.
I don’t have any mobile Apple devices. If you can contribute a solution, that would be great. It’s also possible that auto-fill is not supported by the browser.
Hello, one minor question:
I do not manage to get this addon working if I use an input prompt on the password field. If I do this, the autofill will be pasted as input prompt and clicking login will give an empty value for the password field.
Is there a fix/workaround for this? Or is the use of an input prompt for the password field not possible?
Yes, I can download it directly from the official repository, thanks. To clarify, my setup contains a local Maven Nexus acting as a proxy. For some reason the Nexus can not access the official repository anymore. Maybe I need to update it.
Anyway, now that I am using it, I was wondering, is there a way to access the fields in the default layouts? I would like to remove the entered text when the web app navigates back to the login view after the user has logged out.
I have not provided accessors on purpose, otherwise people will extract the components from the LoginForm instance and add them to the UI - and that will not work. You can subclass the default form and save the text fields for later use.
Based on your feedback, I just added a “clear()” method for the next release that will clear both text fields.
You import import com.vaadin.ui.LoginForm that is the deprecated class in the Vaadin libraries. You have to import com.ejt.vaadin.loginform.LoginForm instead.
This is my first time installing and trying to use a Vaadin add-on. It is not going well:
Widgetset 'com.vaadin.DefaultWidgetSet' does not contain implementation for com.ejt.vaadin.loginform.DefaultVerticalLoginForm. 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 [u]
add-on instructions
[/u].
This is displayed in the browser window, not the console. And this is after using the DefaultVerticalLoginForm code on the add-on page without making any changes to it. I don’t even understand what it wants me to do, let alone how to do it. Please help?