Vaadin Widgetset documentation needs some improvements!!!

So I’ve just tried to move an existing custom widgetset into a new project and it has been an absolute pain.

My first statement would be that it would be really nice if the vaadin documenation team re-did the widget doco from scratch as it really isn’t helpful.

So a couple of things that I found that might help othe people.

  1. place your components under a common directory called something like widgets.
  1. Place your custom widgets module under the widgets directory.
  1. Under the widgets directory create TWO directories for each custom widget. If your widget is called timerLabel then you need two packages.
  1. the client package (…client.timerLabel) should contain all of you client classes:
  1. the server side class should live in the …/widgets.timerLabel package
  1. Add an @Widget annotation to your UI class. The annotation needs the full path to your .gwt.xml file so:
    The other annotations shown below have nothing to do with widgets but I’ve left them there for context.
@Viewport("width=device-width, initial-scale=1.0")
public class ControllerUI extends UI
  1. do a full clean and build each time you change your configuration:
mvn clean
mvn install

You need to tell eclipse to refresh its project view after doing a maven build. You can also use the eclipse vaadin plugin to build the widget, but when in doubt I do the above maven commands.
  1. If you change your widgets set or the path to your widget set MAKE CERTAIN to HARD RELOAD your browser CACHE otherwise it will keep asking for/using the old one.

The above examples are based on an open source project I’m working so you can reference the full code here:

Hope you find this useful.

Thanks Brett. This is very valuable feedback for us, I have forwared it inside Vaadin.