-
FEATURED COMPONENTS
First time here? Check out the FAQ!
borderlayout.zul
<?page id="indexPage" title="" contentType="text/html;charset=UTF-8"?>
<zk>
<style>
<![CDATA[
html
{
overflow-x: hidden; overflow-y:hidden;
height:100%;
width:100%;
}
body {
padding: 0!important;
}
]]>
</style>
<zscript>
<![CDATA[ //@DECLARATION
void onClientEvent(ClientInfoEvent evt)
{
int desktopHeight = evt.getDesktopHeight();
int desktopWidth = evt.getDesktopWidth();
session.setAttribute("desktopHeight" , desktopHeight);
session.setAttribute("desktopWidth" , desktopWidth);
session.setAttribute("topHeight" , 82 + 5 +20);
}
]]>
</zscript>
<window onClientInfo="onClientEvent((ClientInfoEvent)event);" visible="false" id="win"/>
<borderlayout id="main" height="100%" width="100%" apply="com.lansecs.web.zkoss.composer.MainLayoutComposer">
<north size="82px" style="border-bottom:0px;">
header
</north>
<center style="border-bottom:0px;">
<iframe src="/bug/home.zul" height="100%" width="100%" scrolling="no" fulfill="main.onCreate" />
</center>
<south size="20px">
footer
</south>
</borderlayout>
</zk>
home.zul
<?page title="主页" contentType="text/html;charset=UTF-8"?>
<zk>
<style>
<![CDATA[
html
{
overflow-x: hidden; overflow-y:hidden;
height:100%;
width:100%;
}
body {
padding: 0!important;
}
]]>
</style>
<borderlayout height="100%" width="100%" style="border:0px;">
<west size="240px" style="border-top:0px;border-left:0px;border-bottom:0px;">
dd
</west>
<center style="border:0px;">
<div>
<panel title="policy" Framable="false" height="${(desktopHeight - topHeight)/3}px">
<panelchildren>
<columnlayout width="${desktopWidth}px"><columnchildren width="80px" forEach="1,2,3,4,5,6,7,8,9,10,11"><panel><panelchildren><div align="center"><toolbarbutton label="menu${each}" image="/resource/image/header/item2.png" orient="vertical"/></div></panelchildren></panel></columnchildren></columnlayout>
</panelchildren>
</panel>
<panel title="statistics" Framable="false" height="${(desktopHeight - topHeight)/3}px">
<panelchildren>
<columnlayout width="${desktopWidth}px"><columnchildren width="80px" forEach="1,2,3,4,5,6,7,8,9,10,11"><panel><panelchildren><div align="center"><toolbarbutton label="menu${each}" image="/resource/image/header/item2.png" orient="vertical"/></div></panelchildren></panel></columnchildren></columnlayout>
</panelchildren>
</panel>
<panel title="report" Framable="false" height="${(desktopHeight - topHeight)/3}px" >
<panelchildren>
<columnlayout width="${desktopWidth}px"><columnchildren width="80px" forEach="1,2,3,4,5,6,7,8,9,10,11"><panel><panelchildren><div align="center"><toolbarbutton label="menu${each}" image="/resource/image/header/item2.png" orient="vertical"/></div></panelchildren></panel></columnchildren></columnlayout>
</panelchildren>
</panel>
</div>
</center>
</borderlayout>
</zk>
Hi,
How to reproduce your problem,
since there is a composer class which is not given,
<borderlayout id="main" height="100%" width="100%" apply="com.lansecs.web.zkoss.composer.MainLayoutComposer">
BTW, make a description for the bug is appropriate.
i use IE7.0.5730
zk 3.6.0 on xp
the bug is the borderlayout can't show normal
borderlayout.zul center area is blue background (home.zul borderlayout background)
Hi,
I found the bug too,
but no idea to solve,
how about tried include to replace iframe?
And please post the bug to zk bugs,
thanks!
http://sourceforge.net/tracker/?group_id=152762&atid=785191
Hi,
Please try this way, I use a div to replace iframe,
<center style="border-bottom:0px;"> <div height="100%" width="100%"> <attribute name="onCreate" > Executions.createComponents("home.zul",self,null); </attribute> </div> </center>
sorry i use include before but if in the same desktop create multi component
the zk performance is Alarming
so i replace include use iframe because this will have multi desktop , the zk performance is good
i yet want to use include component Rather than iframe
but i can't find which component i use have problem that have the performance problem
Ok,
I have no good idea about your situation,
in my experence,
macro and createComponents perform better than include,
because they share the same space with current desktop,
just like they are parts of the page which includes them.
But it's not easy to maintain a stable apllication when you use lots of macros,
especially there are composer and data-binding mechanism for almost pages.
If iframe help a lot,
you could post the bug to zk bugs,
maybe you will get solution in days.
use createComponents will have multi zk ID problem
because my index will a tabbox and may load multi page in the tabbox
Rather than the index only load a page for once
and my project is huge will have about 200 - 300 zul page so i use iframe can control the project easy
Asked: 2009-05-11 03:04:13 +0800
Seen: 723 times
Last updated: May 12 '09