0

Strange intbox in messagebox

asked 2022-03-01 01:27:02 +0800

manuela0000 gravatar image manuela0000
5 1

Hello!

I want to display a simple messagebox to the user. This is my code:

        Messagebox.show("something", "Info", Messagebox.CANCEL | Messagebox.OK, Messagebox.EXCLAMATION, new EventListener<Event>() {
            public void onEvent(Event evt) throws InterruptedException {
                Utils.getDebug(this.getClass(),Thread.currentThread());

                if (evt.getName().equals("onOK")) {
                    delete();
                } 
            }
        });

My problem is that in localhost it works correctly, so it shows two buttons.

Instead, in my linux server I see only the OK button and there is an unwanted intbox.

Anyone knows the reason?

Thanks to all in advance!

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-03-01 17:35:56 +0800

MDuchemin gravatar image MDuchemin
2228 1 5
ZK Team

Hi There,

Could you post the content of the messagebox data sent back to the client by the /zkau request triggering this messagebox? This should tell us if the server is constructing the messsagebox incorectly, or if the client is doing something wrong with it.

As for why the messagebox would look different, a possible answer would be that something is setting a messagebox template in your other server: https://www.zkoss.org/javadoc/latest/zk/org/zkoss/zul/Messagebox.html#setTemplate-java.lang.String-

https://www.zkoss.org/wiki/ZKComponentReference/Supporting_Classes/Messagebox See template section

Essentially, the messagebox can be modified by giving it a template, which will affect how the messagebox renders itself. This is global, so if done once, it will affect all subsequent messageboxes created in your application.

You can log the value of Messagebox.getTemplate(); before calling Messagebox.show(). This will let you know if you are using the default template (~./zul/html/messagebox.zul) or if the template was modified prior to rendering that messagebox.

link publish delete flag offensive edit

Comments

Man, you are a GENIUS!! I was desperated, but now it works thanks to you. Thank you, thank you!! :D

manuela0000 ( 2022-03-02 00:55:09 +0800 )edit

happy to hear it helped ;)

MDuchemin ( 2022-03-02 15:49:29 +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: 2022-03-01 01:27:02 +0800

Seen: 5 times

Last updated: Mar 01

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