Milos Samek
Milos Samek

Reputation: 81

vaadin 8 + spring custom widgetset

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>

Upvotes: 0

Views: 340

Answers (1)

Mika
Mika

Reputation: 1276

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.

Upvotes: 1

Related Questions