Okay, I’ve discovered why I get a window showing up now, with the icon showing, but the rest of the page is not visible even though I can see it’s in the DOM. The “window not opening” seems to be related to the Drawer 1.1.8 getting a GridLayout null exception, but for popup windows that do not have this bug, the contents are still not right.
In our popup Window code, we create a Panel, set it to full size and scrollable, then get it’s content (VerticalLayout) where when we set it to full size, the contents appear. But we don’t get scrollbars when the window is smaller than the content.
So we changed the VerticalLayout to setWidth 100% and setHeight to undefined (-1). At this point, the contents are not being rendered.
So, the question is how do I create a popup window that will hold whatever view I am putting in there AND allow scrollbars to appear? We tried setting the layout to undefined, but while this allows both horizontal and vertical scrollbars, the contents often do not render correctly.
Our popup window (inherits from Window) basically has:
super(windowCaption);
super.setWidth(80, UNITS_PERCENTAGE);
super.setHeight(80, UNITS_PERCENTAGE);
// We'll create a full size panel to replace the default VerticalLayout of the Window so we can have scrollbars for our content (the view)
Panel windowPanel = new Panel();
windowPanel.setSizeFull();
windowPanel.setScrollable(true);
VerticalLayout panelLayout = (VerticalLayout)windowPanel.getContent();
panelLayout.setMargin(false);
panelLayout.setSpacing(false);
panelLayout.setSizeFull();
//panelLayout.setSizeUndefined();
//panelLayout.setWidth(100, UNITS_PERCENTAGE);
//panelLayout.setHeight(-1, UNITS_PIXELS);
super.setContent(windowPanel); // Set this before we set our view since that routine will expect the Panel to be our window's content.
So, if we use setSizeFull(), whatever views we put in there render fine, but we get no scrollbars.
If we use setSizeUndefined(), the views often look odd, either with much missing, or UI components set to 100% wide are really narrow rather than fill the popup window’s width.
If we use the combination of setWidth(100%) and setHeight(-1), the view widths are fine, but again most of the content does not appear though it’s in the DOM.
For now, we’re back to setSizeFull() since that we’re happier to have the views render correctly even though they get no scrollbars, which is really not very nice.
Is there a better scheme for what I’m trying to do with a popup window where the view fills the window as much as possible (like it does when shown on our main window), yet will allow a scrollbar if the window is made smaller than its contents?