How to create/structure extension for Vaadin 7?


Can someone give me a hint on how to create/structure extension for Vaadin 7 ?

I tried to create simple extension by following the example of CapsLockWarning from , but seems like the AbstractExtensionConnector never got called.

I have been reading multiple sources such as

and also looking at the way the other Add-ons structured, however the extension seems like not working.

During client compile I notice seems like the AbstractExtensionConnector is compiled (previously it says 1 source file)

 --- vaadin-maven-plugin:7.2.7:resources (default) @ nextinteract-webapp ---
 auto discovered modules [com.vaadin.demo.dashboard.DashboardWidgetSet]

 **2 source files** from GWT module com.vaadin.demo.dashboard.DashboardWidgetSet
 <<< vaadin-maven-plugin:7.2.7:compile (default-cli) < process-resources @ nextinteract-webapp <<<
 --- vaadin-maven-plugin:7.2.7:compile (default-cli) @ nextinteract-webapp ---
 auto discovered modules [com.vaadin.demo.dashboard.DashboardWidgetSet]

 Failed to retrieve com.vaadin:vaadin-client-compiler based on project POM
 Using com.vaadin:vaadin-client-compiler version 7.2.7
 Compiling module com.vaadin.demo.dashboard.DashboardWidgetSet
    Validating units:
       Ignored 4 units with compilation errors in first pass.

I noticed some Add-on put all the source files together with the GWT module descriptor and some separate it. In our project I structure it with

Module descriptor

    <inherits name="com.vaadin.DefaultWidgetSet"/>
    <!— and other inherits, e.g. filter table —>
	<!— we don't have source="client" declaration, based on GWT documentation it is implicitly adding "client" sub-package —>

**Sources **

Location: src/main/java/

  • com.vaadin.demo.dashboard.client.CapsLockWarningConnector
  • com.vaadin.extensions.CapsLockWarning

In order to create the extension, do I have create separate maven project just to contain the extension codes, or can I just combine it together with the existing project that we already have?

So any hints or suggestion on how to fix it, gonna be great.

Vaadin version: 7.2.7

To get the basics right, I would recommend to study very simple add-on extensions first. Idea of extensions is to add functionality to existing components, like this one is extending a Button.