Screen size problem..

I am building my Vaadin application using Linux/Eclipse on a display that is set to 1280x1024 resolution and it works fine. This is a web application, so I copy the .war file to a target machine and connect to it with my web browser. But when I try to run it from a machine with the display set to something smaller (in this case a Mac with a display resolution of 1440 x900) the bottom part of my screen does not display, and there is no scroll bar that I can find on the page so I can’t access elements at the bottom of the page.

Can someone tell me what I need to do to make the page completely visible on any size browser window? The code that creates my main web page looks more or less like this (I’ve removed some details…)


public class Dispatcher extends VerticalLayout {
     public Dispatcher(){

		vlWorkspace = new VerticalLayout();

		setSizeFull();
		buildHeader();
		buildWorkspace();
		buildFooter();

		addComponent(hlHeader);
		addComponent(vlWorkspace);
		addComponent(hlFooter);
		setExpandRatio(hlHeader, 0.0f);
		setExpandRatio(vlWorkspace, 1.0f);
		setExpandRatio(hlFooter, 0.0f);
	}

The 3 regions of my page are in hlHeader, hlFooter and vlWorkspace. The header and footer objects are fixed size, and the middle of the page should expand as needed to fill the screen… Obviously I’m not doing that quite correctly, although it does seem to work for my development display environment.

Any help would be appreciated…

thanks

nbc

VerticalLayout does have any scrollbar. Change it’s type to a Panel with style set to PANEL_LIGHT in order to have scrollbars.
See
this chapter of the book
for more details

I will look into making it a panel… Thanks.

In the meantime, I found that this works, although I’m not 100% sure why…


public Dispatcher(DSI_Config_Application app, User u){
        vlWorkspace = new VerticalLayout();
        setSizeFull();
        buildHeader();
        buildWorkspace();
        buildFooter();

        vlWorkspace.setHeight("100%");               // added this line...
        addComponent(hlHeader);
        addComponent(vlWorkspace);
        addComponent(hlFooter);
//        setExpandRatio(hlHeader, 0.0f);            // commented this out...
        setExpandRatio(vlWorkspace, 1.0f);
//        setExpandRatio(hlFooter, 0.0f);             // commented this out...
	}

And the result is that it seems to fit on my Mac screen which has the smaller resolution… But I think the Panel is probably the better approach. I will check that out. Thanks

nbc