use of com.vaadin.data.util.GeneratedPropertyContainer in project VaadinUtils by rlsutton1.
the class SearchableGrid method init.
public void init(String uniqueId, Class<E> entityClazz) {
if (!getSecurityManager().canUserView()) {
this.setSizeFull();
this.setCompositionRoot(new Label("Sorry, you do not have permission to access " + getTitle()));
return;
}
container = getContainer();
grid = new Grid(new GeneratedPropertyContainer(container));
grid.setSizeFull();
searchBar = buildSearchBar();
mainLayout = new VerticalLayout();
mainLayout.setSizeFull();
addTitle(mainLayout);
mainLayout.addComponent(searchBar);
mainLayout.addComponent(grid);
mainLayout.setExpandRatio(grid, 1);
this.setCompositionRoot(mainLayout);
headingPropertySet = getHeadingPropertySet();
headingPropertySet.setDeferLoadSettings(true);
headingPropertySet.applyToGrid(entityClazz, grid, uniqueId + entityClazz.getSimpleName());
}
Aggregations