zero_cool zero_cool - 2 months ago 23x
Java Question

How to use Vaadin add-on with Spring Boot?

I'm using Vaadin 7.6.3 with Spring Boot. I'm trying to use the PopupButton add-on (but I don't think the issue is specific to the add-on).

I added the add-on as a dependency to gradle. This is the code for creating a PopupButton:

PopupButton btn = new PopupButton("Test Button");
btn.setContent(new Label("Test"));

Via the Vaadin plugin for Gradle I ran the task
which created the file
and serveral files in
. I also added
to my UI. I confirmed that the widgetset is used via the client's

Content of

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Vaadin//DTD Vaadin 7//EN" "">
<!-- WS Compiler: manually edited -->
<inherits name="com.vaadin.DefaultWidgetSet" />
<set-configuration-property name="devModeRedirectEnabled" value="true" />
<set-property name="user.agent" value="ie8,ie9,gecko1_8,safari,ie10" />
<source path="client" />
<source path="shared" />
<collapse-all-properties />
<set-property name="compiler.useSymbolMaps" value="true" />

The problem is that on the client the button shows up as a standard button (no chevron) and doesn't open a popup when clicked.


Your widgetset does not contain the addon. See the the example:

 <inherits name="org.vaadin.hene.popupbutton.widgetset.PopupbuttonWidgetset" />

Once added, recompile the widgetset, restart your application.

Usually the gradle plugin can handle this for you, but that feature can be disabled and or some other configuration error could prevent it. Hard to tell without the build.gradle...


The gradle vaadin plugin seems not to be able to handle this addon properly. As a workaround disable the automatic management for widgetset, which prevents regeneration of the gwt.xml. See manageWidgetset in E.g. add vaadinCompile.manageWidgetset = false in your vaadin{}-block.