Last active
June 19, 2017 12:30
-
-
Save alejandro-du/2b1de232dc6b5c251e4191595ede070b to your computer and use it in GitHub Desktop.
Vaadin 8.1 - TreeGrid example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example; | |
import com.vaadin.ui.TreeGrid; | |
import com.vaadin.ui.VerticalLayout; | |
/** | |
* @author Alejandro Duarte. | |
*/ | |
public class TreeGridExample extends VerticalLayout { | |
private Service service = new Service(); | |
public TreeGridExample() { | |
TreeGrid<Person> tree = new TreeGrid<>(Person.class); | |
tree.setColumns("firstName", "lastName"); | |
tree.setItems(service.findAll(), Person::getTeam); | |
addComponent(tree); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment