vaadin 8 + spring custom widgetset

两盒软妹~` 提交于 2019-12-25 12:09:13

问题


i am trying to get working client-side component with class with spring+vaadin boot.

The problem is probably in custom widgetset. Where should be placed in project? close to client component? Resouces (cant compile while in resources)

But my client component is not getting called onStateChange. I have tryed everyting but i cant handle it.

gwt package {
client {
connector extended by AbstractExtensionConnector with @Connect directivy 
ClientSide class with java
}
AppWidgetset.gwt.xml
}

impl
{
server {
Class with AbstractExtension
}

}


pom.xml
     <plugin>
     <groupId>com.vaadin</groupId>
     <artifactId>vaadin-maven-plugin</artifactId>
     <version>${vaadin.plugin.version}</version>
     <configuration>
     <extraJvmArgs>-Xmx1G -Xss1G</extraJvmArgs>

   <webappDirectory>${basedir}/target/classes/VAADIN/widgetsets</webappDirectory>
     <hostedWebapp>${basedir}/target/classes/VAADIN/widgetsets</hostedWebapp>
     <noServer>true</noServer>
     <persistentunitcachedir>${basedir}/target/tmp/gwt-unitCache</persistentunitcachedir>
     <compileReport>true</compileReport>
     <strict>true</strict>
     </configuration>
     <executions>
    <execution>
    <goals>
    <goal>update-theme</goal>
    <goal>update-widgetset</goal>
    <goal>compile
    </goal> <!-- Comment out compile-theme goal to use on-the-fly theme 
    compilation -->
     <goal>compile-theme</goal>
     </goals>enter code here
     </execution>
     </executions>

     </plugin>

回答1:


You place WidgetSet.gwt.xml file in src/main/resources in folder that matches your widget class.

If I have my widget in

src/main/java/com/m1kah/vaadinapp/mywidget/MyWidget.java

Then my widgetset file would be in this location

src/main/resources/com/m1kah/vaadinapp/mywidget/Widgetset.gwl.xml

CSS styles and other "public" files are in same resources path in folder public.



来源:https://stackoverflow.com/questions/47477888/vaadin-8-spring-custom-widgetset

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