Creating a custom add-on trouble

Hey everyone,

i’m just new on vaadin and need help to get a custom addon working.

I think the addon is just right but when i would create the demo for the addon i get:

Widgetset 'de.incony.vaadin.autocomplete.demo.DemoWidgetSet' does not contain implementation for de.incony.vaadin.autocomplete.server.AutocompleteField. 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 DemoUi:

[code]
package de.incony.vaadin.autocomplete.demo;

import de.incony.vaadin.autocomplete.server.AutocompleteField;
import de.incony.vaadin.autocomplete.server.AutocompleteQueryListener;

import javax.servlet.annotation.WebServlet;

import com.vaadin.annotations.Theme;
import com.vaadin.annotations.Title;
import com.vaadin.annotations.VaadinServletConfiguration;
import com.vaadin.annotations.Widgetset;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinServlet;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;

@Theme(“demo”)
@Title(“Autocomplete Add-on Demo”)
@SuppressWarnings(“serial”)
public class DemoUI extends UI
{
@WebServlet(value = “/*”, asyncSupported = true)
@VaadinServletConfiguration(productionMode = false, ui = DemoUI.class, widgetset = “de.incony.vaadin.autocomplete.demo.DemoWidgetSet”)
public static class Servlet extends VaadinServlet {
}

@Override
protected void init(VaadinRequest request) {
    // Show it in the middle of the screen
    final VerticalLayout layout = new VerticalLayout();
    layout.setStyleName("demoContentLayout");
    layout.setSizeFull();
    final AutocompleteField<String> ac = new AutocompleteField<String>();
    ac.setQueryListener(new AutocompleteQueryListener<String>() {
        
        @Override
        public void handleUserQuery(AutocompleteField<String> autocompleteField,
                String query) {
            autocompleteField.addSuggestion("1", "aaaa");
            autocompleteField.addSuggestion("1", "aaaab");
            autocompleteField.addSuggestion("1", "aaaac");
            autocompleteField.addSuggestion("1", "aaaad");
            autocompleteField.addSuggestion("1", "bbbb");
            autocompleteField.addSuggestion("1", "bbbba");
            autocompleteField.addSuggestion("1", "bbbbc");
            autocompleteField.addSuggestion("1", "bbbbd");
            autocompleteField.addSuggestion("1", "bbbbb");
        }
    });
    ac.setSizeFull();
    layout.addComponent(ac);
    setContent(layout);

}

}
[/code]DemoWidgetSet:

[code]

<?xml version="1.0" encoding="UTF-8"?> [/code]But when i compile the widgetset it overrite my widgetset with:

[code]

<?xml version="1.0" encoding="UTF-8"?> [/code]So my add-on widgetset is removed.

Does anyone know more ? Hope someone can help me.

regards
Adrian

Are you using a maven setup for the demo and the add-on?

If so then have you installed the add-on to the local repository with “mvn install”?
It would sound a bit like the widgetset compiler doesn’t find the add-on from the classpath.

If everything is else setup correctly, but the widgetset compiler overrides your xml in a wrong way there is the possibility to add the following line to the top of the in the widgetset.gwt.xml to stop the compiler from editing the file: