0

Businessportal problem on ZK7

asked 2013-11-19 10:53:54 +0800

cocoes gravatar image cocoes flag of Spain
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>
delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-11-29 07:32:24 +0800

jumperchen gravatar image jumperchen
3909 2 8
http://jumperchen.blogspo... ZK Team

Looks like your styling may not work with the latest version. zclass="myportallayout" Please check the styling setting by browser's developer tools.

link publish delete flag offensive edit

Comments

You're right. Removing the zclass="x" from the protallayout solves the problem. Even if the "myportallayout" class is empty, the layout brokes the portal children. Should the portallayout allow the use of zclass?(The link to Style Guide in the wiki goes to unexisting page but the java method exists)

cocoes ( 2013-11-29 11:53:54 +0800 )edit

in your case, you should use setSclass() not setZclass(), please take a look at the style guide first.

jumperchen ( 2013-12-03 02:59:11 +0800 )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
2 followers

RSS

Stats

Asked: 2013-11-19 10:53:54 +0800

Seen: 29 times

Last updated: Nov 29 '13

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