I have a requirement wherein i need to display a tree containing users home folder hierarchy including files and folders. I have been trying to use Vaadin TreeGrid and FileSystemDataProvider for this purpose
I am using Vaadin 21.0.0 and using this dependency
<dependency>
<groupId>org.vaadin.filesystemdataprovider</groupId>
<artifactId>filesystemdataprovider</artifactId>
<version>3.0.0</version>
</dependency>
The Code for the same is as follows
String path = System.getProperty("user.home");
File rootFile = new File(path);
FilesystemData root = new FilesystemData(rootFile, false);
FilesystemDataProvider fileSystem = new FilesystemDataProvider(root);
tree.setDataProvider(fileSystem);
add(tree)
However the treegrid is displaying blank(Not displaying the tree structure) on running the program. Need your help guys on this what i might be doing wrong