0

Set template for default message box

asked 2019-12-31 05:18:24 +0800

JustinFrost gravatar image JustinFrost
145 1 6

When we get a ZK exception in our application (eg class not found on zul page) we get the default ZK modal message:

image description

How do I use a custom template for this ? I would like to set the title and change the layout.

I have tried MessageBox.setTemplate() but this only changes the message boxes displayed with Messagebox.show(...)

Thanks.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-12-31 10:54:28 +0800

cor3000 gravatar image cor3000
5069 2 7
ZK Team

updated 2019-12-31 11:01:32 +0800

You could use CSS to change the appearance for this dialog, and the default title "ZK" can be changed by setting the webapp name: https://www.zkoss.org/wiki/ZKConfigurationReference/zk.xml/The_Preferences/org.zkoss.zk.ui.WebApp.name

e.g.: http://zkfiddle.org/sample/uhqqpv/1-change-au-error-title

For maximum flexibility, this error box for AJAX errors can be fully replaced as described in: Error Handling When Serving AU Requests

You can specify an arbitrary zul page, and retrieve exception information from the described request-attributes.

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: 2019-12-31 05:18:24 +0800

Seen: 11 times

Last updated: Dec 31 '19

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