0

I am using Rapidclipse X (Vaadin 14, JPA/Hibernate) and a MySql database. By means of JPA/hibernate i store input data from a UI into the MySql database. That works fine so far. However when i want to display the data inside a grid, nothing happens, only a grey line appears.

this.grid.setDataProvider(DataProvider.ofCollection(TestDAO.INSTANCE.findAll()));

That's how I try to get the data.

The grid gets displayed in a dialog. How do i make the grid visible in the dialog?

  • Have you configured columns to your Grid, Grid grid = new Grid<>(TestDAO.class); or column by column as described in https://vaadin.com/docs/v14/flow/components/tutorial-flow-grid.html ? – Tatu Lund Oct 15 '19 at 09:34
  • Yes i have configured several columns lik this: `this.grid.addColumn(Test::getName).setKey("name") .setHeader(CaptionUtils.resolveCaption(Test.class, "name")).setSortable(true);` –  Oct 15 '19 at 09:38
  • The grid gets displayed in a dialog. Apparently that's the problem. If i navigate to the UI via Route it works. Only if i add the UI to my dialog it does not. Why is that? –  Oct 15 '19 at 09:56
  • Sounds like a regression of this bug from the past, does it work if you set some width and height yourself? https://github.com/vaadin/vaadin-dialog/issues/76 – Tatu Lund Oct 15 '19 at 12:13
  • @TatuLund unfortunately it doesn't work if i do something like this `Dialog dialog = new Dialog(); dialog.setMinWidth("800px"); dialog.setMinHeight("600px"); dialog.add(new View()); dialog.open();` But it does work if i set the actual height and width. Is there another solution to ensure responsivness –  Oct 16 '19 at 04:26

0 Answers0