0

Combobox gets closed on MessageBox closure

asked 2020-04-24 19:12:27 +0800

rsheth gravatar image rsheth
103 2

Hello All,

I'm using ZK CE-9.0.0.

I have a combobox which I need to open programmatically, on click of OK button of the Messagebox. Hence I have implemented a Listener for the click event of the OK button. Inside the click event, I'm opening the combobox by using the following code:

EventListener<Messagebox.ClickEvent> clickListener = new EventListener<Messagebox.ClickEvent>() {
    @Override
    public void onEvent(ClickEvent event) throws Exception {
        mycombo.open();
    }
};
Messagebox.Button[] buttons = new Messagebox.Button[] {Messagebox.Button.OK};
Messagebox.show("Hi btn", buttons, clickListener);

Now the problem that I'm facing is, the combobox opens for half a second. It then immediately gets closed automatically.

As per my understanding, it's because of the Messagebox. Once the execution of the click event is completed, the Messagebox is closed & it causes the combobox also to be closed.

Please have a look at this fiddler for better understanding. Please select the ZK version to be 9.0.0 before running it.

Can anyone help me with this please?

Thanks,

RAS

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-05-04 18:38:58 +0800

MDuchemin gravatar image MDuchemin
1688 1 5
ZK Team

Hi RAS,

I've sent an answer in the stackoverflow thread.

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

RSS

Stats

Asked: 2020-04-24 19:12:27 +0800

Seen: 8 times

Last updated: May 04

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