Skip to content

Instantly share code, notes, and snippets.

@alejandro-du
Last active June 19, 2017 12:30
Show Gist options
  • Save alejandro-du/2b1de232dc6b5c251e4191595ede070b to your computer and use it in GitHub Desktop.
Save alejandro-du/2b1de232dc6b5c251e4191595ede070b to your computer and use it in GitHub Desktop.
Vaadin 8.1 - TreeGrid example
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