Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Vaadin 8 + PopupView + Grid

Alexander Wagner
5 years ago Jan 22, 2017 10:25am

Version: 8.0.0.beta1

A grid in a popupView will not be displayed correctly after the second click on 'Show grid'.
The heights of the cells are calculated to '1px'.

Sample to reproduce:

protected void init(VaadinRequest request) {
  VerticalLayout vl = new VerticalLayout();

  Grid<Car> grid = new Grid<>();

  List<Car> cars = new ArrayList<>();
  cars.add(new Car("Car 1"));
  cars.add(new Car("Car 2"));
  cars.add(new Car("Car 3"));

  PopupView popupView = new PopupView("Show grid", grid);
  popupView.setHideOnMouseOut(false);

  CarDataProvider cdp = new CarDataProvider(cars);
  grid.setDataProvider(cdp);

  Column<Car, String> col = grid.addColumn(new ValueProvider<Car, String>() {
    private static final long serialVersionUID = 1L;

    @Override
    public String apply(Car car) {
      return car.getName();
    }
  });

  col.setCaption("Cars");

  vl.addComponent(popupView);
  setContent(vl);
}
Matti Tahvonen
5 years ago Feb 21, 2017 9:39am
Michael Benz
5 years ago Mar 09, 2017 12:33pm