0

The onClick event is triggered instead of onOpen

asked 2014-10-29 16:55:28 +0800

bygreg gravatar image bygreg
9

updated 2014-10-30 06:18:53 +0800

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

hi there

we have a problem I think it could be a bug

here is our selecttor composer code

@Listen("onOpen = #southContainerId; #southInfoContainerId; #southWIFIContainerId")
public void onOpenSouthContainer(Event evt) {

    evt.stopPropagation();

    ((South)evt.getTarget()).setCollapsible(false);
  System.out.println( evt.getTarget().getAttributes());



    System.out.println("on open event "+evt.getTarget().getId());
     System.out.println("IS OPEN    "+((South)evt.getTarget()).isOpen());
     System.out.println("*******+ ");
}

it prints

{_SELECTOR_COMPOSER_EVENT_LISTENERS=[onClick#public void com.aniachi.zul.zhtml.BuildPeticionController.onOpenSouthContainer(org.zkoss.zk.ui.event.Event)]}
on open event southInfoContainerId
IS OPEN    false
*******+ 

{_SELECTOR_COMPOSER_EVENT_LISTENERS=[onClick#public void com.aniachi.zul.zhtml.BuildPeticionController.onOpenSouthContainer(org.zkoss.zk.ui.event.Event)]}
on open event southInfoContainerId
IS OPEN    false
*******+

here is the zul page

<south collapsible="true" open="false" splittable="false" 
    height="560px" id="southInfoContainerId" 
    style=" border-radius: 0px 0px 12px 12px; ">
delete flag offensive retag edit

Comments

In ZK's spec, if it's floating-open, calling isOpen will return false. isOpen should be used for detecting if a panel is really opened.

JerryChen ( 2014-11-05 01:26:54 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-10-30 06:47:47 +0800

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

I'm just looking to this code => trying to reproduce it in fiddle and come up to this very strange affect.

fiddle : http://zkfiddle.org/sample/3a7c0bu/1-bug-suspect-in-Listen

Steps : Run fiddle (zk 6.5.x to zk 7.0.3)
=> click on the North for showing the north.
=> You see the north coming open and a messagebox appears (north is still open in the back.)
=> Click ok and the panel is closing again.
=> remove the messagebox and it works... => change the messagebox to System.out.println("*+ "); and it works to ...

@ZK, can you look at this and explain when it's correct behavior or confirm if it's a bug?

Greetz chill.

link publish delete flag offensive edit

Comments

After I try to run this code on my environment 7.0.4 FL, it works perfectly. when you click on the north, it will become to float state. if you lose the focus from the shown panel, the panel will be closed.

JerryChen ( 2014-11-05 01:04:41 +0800 )edit

oke thx for the answer @JerryChen

chillworld ( 2014-11-05 05:53:08 +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
1 follower

RSS

Stats

Asked: 2014-10-29 16:55:28 +0800

Seen: 12 times

Last updated: Oct 30 '14

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