0

Borderlayout question

asked 2016-03-02 09:11:39 +0800

andij62 gravatar image andij62
315 1 7

Hi all,

is it possible to open/close the south-Area when i click the entire South-Panel same as i click the arrow-button? I use zk-8.

Regards Andi

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-03-02 14:00:18 +0800

gganassin gravatar image gganassin flag of Luxembourg
540 6
http://www.hybris.com/

updated 2016-03-02 14:11:48 +0800

Hello Andi!

I'd do like this:

<zk>
<window id="win" title="Hello World!!" border="normal" hflex="1" vflex="1" apply="test.SouthTestComposer">
    <borderlayout>
        <north>Hello North</north>
        <center>Hello Center</center>
        <south id="mySouth" title="test" collapsible="true" height="200px">
            <div>Hello South <button>test</button></div>
        </south>
    </borderlayout>
</window>
</zk>

and the controller:

public class SouthTestComposer extends SelectorComposer<Window> {

    @Wire
    private South mySouth;

    @Listen("onClick = #mySouth") // this will work for everything apart from the button or any other component which stops the propagation
    @Listen("onClick = #mySouth *") // this will work for everything inside the south but not the header bar
    public void onSouthClick(Event event) {
        if (mySouth.isOpen()) {
            mySouth.setOpen(false);
            mySouth.invalidate();
        }
    }
}

Hope it helps Gio

link publish delete flag offensive edit
0

answered 2016-03-08 17:05:05 +0800

andij62 gravatar image andij62
315 1 7

Hi,

is it possible to do it with pure Javascript?

Regards Andi

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: 2016-03-02 09:11:39 +0800

Seen: 18 times

Last updated: Mar 08 '16

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