Vaadin : Widget set is not getting loaded.

前提是你 提交于 2019-12-02 07:28:15

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!