asked
2013-11-19 10:53:54 +0800
cocoes 94 ● 6 Hi,
I'm testing last ZK EE 7.0.0-FL-2013-11-18 , and I've found a problem with business portal that didn't happen on zk-7.0.0-RC nor zk-7.0.0-FL-2013-08-30 nor zk-6.5.4 .
I had a three columns businessportal, where columns and panels are made visible or added dinamically. In my app, the second column children are not shown at all. In the demo test that I add here, all column 1 and 2 panels are added in the same column with ZK EE 7.0.0-FL-2013-11-18, but worked perfectly on previous versions.
I've not been able to simulate the problem, but as it does not works the same as in the past versions, may be it can help.
TestComposer.java:
public class TestComposer extends GenericForwardComposer {
Window window;
Portallayout bussinessPortal;
Portalchildren ptc1, ptc2, ptc3;
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
window = (Window)Path.getComponent("//mypage/mywindow");
bussinessPortal = ((Portallayout)comp.getFellow("bussinessPortal"));
ptc1.appendChild(createPanel("Panel 1-1"));
ptc1.appendChild(createPanel("Panel 1-2"));
ptc2.appendChild(createPanel("Panel 2-1"));
ptc2.appendChild(createPanel("Panel 2-2"));
ptc2.appendChild(createPanel("Panel 2-3"));
ptc3.appendChild(createPanel("Panel 3-1"));
ptc1.setWidth("30%");
ptc1.setVisible(true);
ptc2.setWidth("70%");
ptc2.setVisible(true);
ptc3.setVisible(false);
}
private Panel createPanel(String title) {
Panel p = new Panel();
p.setBorder("normal");
p.setTitle(title);
p.appendChild(new Panelchildren());
Include inc = new Include("/test_portlet.zul");
inc.setHflex("1");
inc.setVflex("1");
inc.setMode("instant");
inc.afterCompose();
p.getPanelchildren().appendChild(inc);
return p;
}
}
test.zul:
<?xml version="1.0" encoding="UTF-8"?>
<?page id="mypage" ?>
<zk>
<window id="mywindow" border="none" apply="test.TestComposer">
<portallayout id="bussinessPortal" maximizedMode="whole" zclass="myportallayout" style="overflow: visible" >
<portalchildren id="ptc1" width="30%" height="100%"/>
<portalchildren id="ptc2" width="70%" height="100%"/>
<portalchildren id="ptc3" width="0%" height="100%" visible="false"/>
</portallayout>
</window>
</zk>
test_portlet.zul:
<?xml version="1.0" encoding="UTF-8"?>
<zk xmlns:h="xhtml" xmlns:zk="zk">
<label>Hello</label>
</zk>