0

I trying to use the Tree() method with last version of Vaadin inside my maven project with spring-boot to create a drop down simple menu, but I can't import the correct packages.

I just have these dependencies in my pom.xml file:

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.2.RELEASE</version>
    </parent>
    <groupId>spring.boot.vaadin.admin</groupId>
    <artifactId>spring.boot.vaadin.admin.ui</artifactId>
    <version>0.0.1-SNAPSHOT</version>
   <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-spring-boot-starter</artifactId>
            <version>2.0.0</version>
        </dependency>
    </dependencies>
    <properties>
        <java.version>1.8</java.version>
    </properties>
    <build>
        <sourceDirectory>src/main/java</sourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <executable>true</executable>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                    <warName>spring-boot-vaadin-admin-ui-components</warName>
                </configuration>
            </plugin>
        </plugins>
        <finalName>spring-boot-vaadin-admin-ui-components</finalName>
    </build>
    <packaging>war</packaging>
</project>

This is the error: enter image description here

What should I do to use Tree() on the latest version of Vaadin and solve this error?

bekce
  • 3,782
  • 29
  • 30
Leo1234562014
  • 76
  • 2
  • 13

1 Answers1

4

Tree component is not fully ready for Vaadin 8 yet. You must use vaadin-compatibility-server package if you want to use it.

<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-compatibility-server</artifactId>
    <version>8.0.2</version>
</dependency>
bekce
  • 3,782
  • 29
  • 30
  • 1
    For more details, you can check the [release notes section for legacy components](https://vaadin.com/download/release/8.0/8.0.2/release-notes.html#legacycomponents) as well as the [migration suggestions](https://vaadin.com/docs/-/part/framework/migration/migrating-to-vaadin8.html) – Morfic Mar 17 '17 at 11:17