Created
February 13, 2018 20:25
-
-
Save alejandro-du/1c4b035fdb01fbb8ad24f286086a53a8 to your computer and use it in GitHub Desktop.
Grid 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.vaadin.starter.skeleton; | |
import com.vaadin.flow.component.grid.Grid; | |
import com.vaadin.flow.component.orderedlayout.VerticalLayout; | |
import com.vaadin.flow.router.Route; | |
import com.vaadin.flow.theme.Theme; | |
import com.vaadin.flow.theme.lumo.Lumo; | |
@Route("") | |
@Theme(Lumo.class) | |
public class MainView extends VerticalLayout { | |
private PersonService service = PersonService.getInstance(); | |
public MainView() { | |
Grid<Person> grid = new Grid<>(Person.class); | |
grid.setSizeFull(); | |
add(grid); | |
grid.setItems(service.findAll()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment