0

Messagebox delay to open using

asked 2013-07-30 13:38:19 +0800

divinormj gravatar image divinormj
3

Hello!

I have an application with ZK 6.0.0 e Spring 2.0.4. Use Messagebox to interact with the user. Each time the Messagebox is called it takes longer to open.

Thanks.

For example: If the user has not indicated any filter, opens a Messagebox stating that at least one filter must be inserted. And each time the Messagebox takes longer to open. This behavior occurs for any zul, in any situation.

Class:

public class AUser extends GenericForwardComposer { ...

public void search() {
    String msg;
    ...

    if(tbNameFilter.getValue().equals("")) {
        ...
        Messagebox.show(msg, title, Messagebox.OK, Messagebox.INFORMATION, 
            new EventListener() {
                @Override
                public void onEvent(Event evt) {
                    switch (((Integer) evt.getData()).intValue()) {
                        case Messagebox.OK:
                            ...
                        break;
                    }
                }
        );
    ...
    }
}
...

}

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-08-05 10:11:08 +0800

cor3000 gravatar image cor3000
6280 2 7

updated 2013-08-05 10:11:58 +0800

Hi,

I tried the following simplified version of what you explain with ZK 6.0.0, and I cannot notice any slowdown... so could you please trye this example in your environment and be more precise, where the slowdown happens (server or clientside, memory leak)?

Composer:

package zk.forum;

import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.util.GenericForwardComposer;
import org.zkoss.zul.Messagebox;

public class MessageboxComposer extends GenericForwardComposer<Component> {

    private String msg = "box message";
    private String title = "box title";
    public void search() {
        Messagebox.show(msg, title, Messagebox.OK, Messagebox.INFORMATION, new EventListener<Event>() {

            @Override
            public void onEvent(Event event) throws Exception {
                switch (((Integer)event.getData()).intValue()) {
                case Messagebox.OK: 
                    System.out.println("OK");
                    break;
                default:
                    System.out.println("other");
                }
            }
        });
    }
}

zul-file:

<zk>
    <div apply="zk.forum.MessageboxComposer">
        <button onClick="$composer.search()" label="search" />
    </div>
</zk>

For me it does not seem to be Messagebox alone, so maybe something more complex is missing.

Cheers, Robert

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: 2013-07-30 13:38:19 +0800

Seen: 18 times

Last updated: Aug 05 '13

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