Hello,
I’m trying out a quick sample of Vaadin and I am attempting to use certain Addons.
I started out my spike by creating a vaadin archetype project in maven:
mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-clean -DarchetypeVersion=LATEST -DgroupId=org.example -DartifactId=vaadin-example -Dversion=1.0 -Dpackaging=war
This created a project using Vaadin 6.5.1
The very next thing I did was try to “mvn jetty:run”, but I got an error about “ResourceCollection.setResourceAsCSV(…) threw exception”.
To fix that, I commented out the “baseResource” element in the maven-jetty-plugin webAppConfig. Once I did that, mvn jetty:run worked fine and served the page.
Next, I wanted to use an Addon. I decided to try the “ConfirmDialog” Addon.
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>confirmdialog</artifactId>
<version>1.1.0</version>
</dependency>
I added the dependency to the pom and put a ConfirmDialog on my window, and when I deployed the site, I saw a ConfirmDialog on the page. Pretty neat!
Next, I wanted to try using the “TreeTable” Addon (http://vaadin.com/directory#addon/vaadin-treetable).
I grabbed the dependency and dropped it in my pom,.
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>vaadin-treetable</artifactId>
<version>1.1.0</version>
</dependency>
I added some code to put a TreeTable on the page, and when I tried to hit the page, I saw the following error on the page:
I read somewhere that I needed to compile the widget modules, so I uncommented some configuration in the pom that was already commented out (this was generated from the archetype). I uncommented the following things:
- The gwt-maven-plugin (2.1.0-1)
- The vaadin-maven-plugin (1.0.1)
- The pluginRepositories for those plugins
- A dependency on com.google.gwt:gwt-user (2.1.1)
I then tried running mvn vaadin:update-widgetset, and got the following message:
I then edited the vaadin-maven-plugin to have the following: (there was already a configuration node in the executions element, but I pulled it up to the plugin level because I don’t think the configuration was supposed to be in the execution)
<configuration>
<modules>
<module>non-existing-module</module>
</modules>
</configuration>
After that, mvn vaadin:update-widgetset gave the following output:
Maven reported the build was successful, and it looks like it found the treetable widget set, but I’m not sure what the the Error was.
I decided to see what would happen if I tried to do a mvn gwt:compile, and got the following output:
This didn’t seem good.
So my question is
: how can I use the TreeTable Addon? (Step by Step instructions are best)
A secondary question is: why did the ConfirmDialog Addon work right away, and the TreeTable Addon seems to require all this additional setup?
I listed all the steps I took in case someone wanted to follow exactly what I had done, and see the errors on their own machine. I have also attached a zip of the project - just the pom and the source - in case someone wants to see if I’ve configured something wrong.
Thanks very much,
André
11612.zip (4.65 KB)