*/
public AbstractCdmPopupEditor(Layout layout, Class<DTO> dtoType) {
super(layout, dtoType);
- // IMPORTANT: the layout must be set to full size otherwise the
- // popup window may have problems with automatic resizing of its
- // content.
- layout.setSizeFull();
if(MarginHandler.class.isAssignableFrom(getFieldLayout().getClass())){
((MarginHandler)getFieldLayout()).setMargin(new MarginInfo(false, true, true, true));
}
public AbstractPopupEditor(Layout layout, Class<DTO> dtoType) {
- setWidthUndefined();
-
mainLayout = new VerticalLayout();
// IMPORTANT: mainLayout must be set to full size otherwise the
// popup window may have problems with automatic resizing of its
// content.
mainLayout.setSizeFull();
+ setCompositionRoot(mainLayout);
fieldGroup = new BeanFieldGroup<>(dtoType);
fieldGroup.addCommitHandler(new SaveHandler());
- setCompositionRoot(mainLayout);
-
toolBar.addStyleName(ValoTheme.WINDOW_TOP_TOOLBAR);
toolBar.setWidth(100, Unit.PERCENTAGE);
toolBarButtonGroup.addStyleName(ValoTheme.LAYOUT_COMPONENT_GROUP);
window.setModal(true);
window.setCaptionAsHtml(popupView.isWindowCaptionAsHtml());
window.setWidth(popupView.getWindowPixelWidth(), Unit.PIXELS);
+ // setting 100% as default height. If the height
+ // would be undefined the window, will fit the size of
+ // the content and will sometimes exceed the height of the
+ // main window and will not get a scroll bar in this situation.
+ // see #6843
+ window.setHeight("100%");
window.setContent(popupView.asComponent());
// window.addCloseListener(e -> popupView.cancel());
UI.getCurrent().addWindow(window);