Skip to content

Commit

Permalink
Step 4 | 04:27 | Populate backend data into the grid
Browse files Browse the repository at this point in the history
  • Loading branch information
amahdy committed Jun 1, 2017
1 parent c680896 commit 6a40fe3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/org/vaadin/stepbystep/MyUI.java
Expand Up @@ -7,6 +7,9 @@
import com.vaadin.ui.HorizontalSplitPanel;
import com.vaadin.ui.UI;
import org.vaadin.stepbystep.person.backend.Person;
import org.vaadin.stepbystep.person.backend.PersonService;

import javax.inject.Inject;

/**
* This UI is the application entry point. A UI may either represent a browser window
Expand All @@ -19,12 +22,17 @@
@CDIUI("")
public class MyUI extends UI {

@Inject
PersonService service;

HorizontalSplitPanel splitPanel = new HorizontalSplitPanel();
Grid<Person> grid = new Grid<>(Person.class);

@Override
protected void init(VaadinRequest vaadinRequest) {

grid.setItems(service.getEntries());

splitPanel.setSizeFull();
grid.setSizeFull();

Expand Down

0 comments on commit 6a40fe3

Please sign in to comment.