alejandro-du / crudui

Automatically generate CRUD-like Vaadin views for any Java Bean
https://vaadin.com/directory#!addon/crud-ui-add-on
Apache License 2.0
86 stars 54 forks source link

Grid is not rendered when GridCrud is used inside a Dialog #48

Closed watho closed 5 years ago

watho commented 5 years ago

Steps to repoduce:

Add to your TestUI line 75 following code for a new tab with a button to open DefaultCrud inside Dialog addCrud(new Div(new Button("Open Dialog", e -> new Dialog(getDefaultCrud()).open())), "Windowed");

See screenshot. The buttonBar is visible, but the grid not.

screenshot_20190221_181750

alejandro-du commented 5 years ago

The Crud component is configured to be size-full by default (the most comon use case). The Dialog component, on the other hand, is size-undefined by default. In order to visualize the Crud component, you have to set its size or set a defined size for the dialog. For example:

Crud<User> crud = new GridCrud<>(User.class);
Dialog dialog = new Dialog(crud);
dialog.setHeight("300px");
dialog.setWidth("600px");
dialog.open();
alejandro-du commented 5 years ago

Thanks for the Minimal, Complete, and Verifiable example!