Vaadin : Widget set is not getting loaded.

前端 未结 2 413
孤独总比滥情好
孤独总比滥情好 2021-01-27 00:45

I was able to integrate a Vaadin module into our Spring based application. After integration I wanted to run a demo of gantt-charts which is an add-on for Vaadin and found it on

相关标签:
2条回答
  • 2021-01-27 00:54

    Try to run mvn clean install to compile the widgetset. If you don't want to use command line, right click in your proyect, Run As > Maven install.

    You can also compile your widgetset in eclipse. Open your widgetset file and click in the "gear" symbol in the eclipse menu.

    0 讨论(0)
  • 2021-01-27 01:09

    You need the vaadin client-compiler to be able to compile your widgetset. Add the following to your pom.xml:

    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-client-compiler</artifactId>
        <version>${vaadin.version}</version>
        <scope>provided</scope>
    </dependency>
    

    And run mvn vaadin:compile to compile your client-side widgetset.

    EDIT: Also have a file called com.journaldev.demoset.gwt.xml in your build path:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
    <module>
        <inherits name="com.vaadin.DefaultWidgetSet" />
    
        <add-linker name="xsiframe" />
    
        <inherits name="org.tltv.gantt.WidgetSet" />
    
    </module>
    

    and change your annotated servlet to read the widgetset from that file.

    @WebServlet(value = "/testvaadin", asyncSupported = true)
    @VaadinServletConfiguration(productionMode = false, ui = MyVaadinUI.class, widgetset = "com.journaldev.demoset")
    public static class Servlet extends SpringVaadinServlet {
    } 
    

    With that, you are defining your own widgetset which includes the one defined in the gantt chart project.

    0 讨论(0)
提交回复
热议问题