dorankseo / wizards-for-vaadin

Automatically exported from code.google.com/p/wizards-for-vaadin
0 stars 0 forks source link

Content Panel in wizard does not support relative layout for contained steps. #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create any wizard.
2. Attempt to add a step with a relative layout, for example a VerticalLayout 
which has some buttons in the bottom right hand corner.
3. Layout will not render as expected (i.e. 100% height) as the VerticalLayout 
owned by the wizard's contentPanel does not have a relative height.

If the above is intended behaviour, then please excuse me for raising this 
issue.

What is the expected output? What do you see instead?

I would expect to see my relatively laid out panel fill the content area, 
instead it is only fills a small amount of the screen. 

If I alter the init() method of the wizard class to contain the following which 
explicitly forces the panel to use a layout that is relatively sized, the 
application behaves as expected:

        VerticalLayout panelContent = new VerticalLayout();
        panelContent.setSizeFull();

        contentPanel = new Panel(panelContent);

What version of the product are you using? On what operating system?

Version 0.4.4 on Windows. 

Please provide any additional information below.

The Vaadin debug is below, the VerticalLayout at the top of the stack is the 
one created by the Wizard's contentPanel, as you can see the height is 
undefined:

Vaadin DEBUG
- VerticalLayout/37250eeb (height: UNDEFINED)
  - QuestionnairePanel/73400f7b (height: RELATIVE, 100.0 %)
    - VerticalLayout/61544abc (height: RELATIVE, 100.0 %)
      - HorizontalLayout/72b88f59 (height: RELATIVE, 100.0 %)
Layout problem detected: Component with relative height inside a VerticalLayout 
with no height defined.
Relative sizes were replaced by undefined sizes, components may not render as 
expected.

Original issue reported on code.google.com by pgo...@healthsolve.co.uk on 5 Jul 2012 at 10:40

GoogleCodeExporter commented 8 years ago
Okay, I've just realised that this is probably intentional and that my use case 
is probably a corner case, as my change will stop scrolling working if that is 
what is required.

Is there any way that this feature could be added, perhaps with another 
constructor?

Original comment by pgo...@healthsolve.co.uk on 5 Jul 2012 at 2:11

GoogleCodeExporter commented 8 years ago
One solution could be to add a possibility to set the content of contentPanel 
instead of adding the WizardStep as  a component? This way the user of the 
Wizard would have to take care of scrolling issues by himself. At least in 
couple of my cases I would have quite clean solutions where the scrolling could 
be handled inside the WizardStep component and therefore its size could (and 
should) be maximized.

Original comment by klaus.ju...@qoco.fi on 3 Aug 2012 at 9:53