Page 1 of 1

[SOLVED]Height problem of layout

Posted: 15 Apr 2013, 09:48
by yyq2009aa
Hi, I have a layout page like following:

Code: Select all

    <h:body>
        <p:layout fullPage="false">
            <p:layoutUnit position="west" size="260">
                <h:form>
                    <p:panelGrid columns="1">
                        <h:commandButton value="Test1"/>
                        <h:commandButton value="Test2"/>
                        <h:commandButton value="Test3"/>
                        <h:commandButton value="Test4"/>
                    </p:panelGrid>
                </h:form>
            </p:layoutUnit>
            <p:layoutUnit position="center">
                <p:panel header="panel1" style="height:400px;">
                </p:panel>
            </p:layoutUnit>
        </p:layout>
    </h:body>
The layout is element layout without fixed height, and only have west and center part, on the picture, you'll see that the real height of the whole layout is sum of west children's height and center children's height, not the maximum one of the two which I expected.
Image

And I can't set a fixed height on layout, because there is a dynamic content in the center part, I can't know the exactly height of it.

So it is a bug ?

Any help will be appreciated.

Re: Height problem of layout

Posted: 15 Apr 2013, 11:03
by kukeltje
Are you sure it is a combination? Isn't the form in the west layoutunit not just big?

Re: Height problem of layout

Posted: 15 Apr 2013, 11:39
by yyq2009aa
kukeltje wrote:Are you sure it is a combination? Isn't the form in the west layoutunit not just big?

Hi kukeltje,

Thanks for your reply.

Yes, I'm sure it is a combination.

And there is no other css files in the page, and all the code is here, so I'm sure the form in the west layout unit is not so big.

Re: Height problem of layout

Posted: 16 Apr 2013, 15:38
by Oleg
1) Element layout needs fix sizes.
2) If you need dynamic sizes, you are wrong with p:layout. This is not a layout component with scrollbars then. Use h:panelGrid for that e.g.

Re: Height problem of layout

Posted: 16 Apr 2013, 16:11
by yyq2009aa
Oleg wrote:1) Element layout needs fix sizes.
2) If you need dynamic sizes, you are wrong with p:layout. This is not a layout component with scrollbars then. Use h:panelGrid for that e.g.
Hi Oleg,

Thanks for your reply. I see that.

You mean the pf layout is only for the scenario which needs scrollbars, so I should use h:panelGrid and div to finish my layout.


Many thanks.

BTW, how can I mark the post as resovled, so that others can see that.

[SOLVED] Height problem of layout

Posted: 16 Apr 2013, 19:57
by smithh032772
yyq2009aa wrote:BTW, how can I mark the post as resovled, so that others can see that.
Optimus/Cagatay, already stated, some/long time ago, that it is not necessary to mark topics as [SOLVED], but if you want to know how to do it, then go to the first/initial post of this forum topic, and EDIT the topic title and put [SOLVED], like I did on the subject/title of this response of mine. :)