0

Problem with the height of a borderlayout when an include is used.

asked 2015-05-26 18:39:59 +0800

eclipse1 gravatar image eclipse1
21 4

updated 2015-05-27 13:20:27 +0800

Hello

I have a problem with the height of the borderlayout, it's always 0px when it's used an include.

Example:

Here is the page that calls the include.

<zk>
  <window border="normal" apply="pkg$.TestComposer" width="100%" height="100%">
     <label value="You are seeing index.zul content." />
     <include src="borderlayout.zul"/>
  </window>
</zk>

Here is the borderlayout.zul

<window border="none" apply="org.zkoss.bind.BindComposer" width="100%" height="100%">

 <borderlayout vflex="1" hflex="1">
    <center autoscroll="true">
          <div>
            <label value="You are seeing borderlayout.zul content." />
          </div>
    </center>
 </borderlayout>
</window>

With this code the height of the bordelayout it's always 0px. It doesn't work having the borderlayout with vflex="1" or height="100%".

I already asked this on:

forum.zkoss.org/question/94443/borderlayout-in-include-not-display-with-height100/

But there wasn't any answer to the problem.

This example is also on fiddle:

zkfiddle.org/sample/3hjfdcj/2-Borderlayout-height-and-width-problem#source-1

delete flag offensive retag edit

Comments

I tried what chillworld sugested but it didn't work.

eclipse1 ( 2015-05-27 13:19:50 +0800 )edit

Try wrap the label and include with vlayout and set h/vflex="1" to the include itself. See http://zkfiddle.org/sample/3hjfdcj/5-Borderlayout-height-and-width-problem

vincentjian ( 2015-05-29 08:05:40 +0800 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2015-05-26 20:39:40 +0800

chillworld gravatar image chillworld flag of Belgium
5357 4 9
https://github.com/chillw...

updated 2015-05-27 13:32:19 +0800

I don't know why you put a window in the included code.
The only thing you do there is declare the viewmodel.
You can do that also in the borderlayout.

If you can't remove it, try setting vflex and hflex of the window also to 1.

Edit:

With your fiddle it's easy to resolve.

Here is the solution in a fiddle.

I put the hflex en vflex also to th einclude element.

Greetz chill.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2015-05-26 18:39:59 +0800

Seen: 24 times

Last updated: May 27 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More