0

zk9 Feature Request:Notification

asked 2019-12-28 08:45:27 +0800

wastemails gravatar image wastemails
130 1 2

It would be nice if the Notification.show() to display header, body and footer content too instead of plain text only

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-12-30 15:10:46 +0800

cor3000 gravatar image cor3000
6280 2 7

updated 2019-12-30 15:17:36 +0800

Notification.show(...) are convenience methods dedicated to show text messages only with various options. For more complex layouts you can always create/display/detach a Popup component with arbitrary content and wrap it into your application's convenience methods.

Popup popup = new Popup();
popup.appendChild(someHeaderComponent);
popup.appendChild(messageComponent);
popup.appendChild(someFooterComponent);
popup.show(...); //with lots of options

Instead of Popup you can also compose a window or panel component.

Window popupWindow = new Window("title");
popupWindow.appendChild(...); //arbitrary contents
popupWindow.doPopup(...);

https://www.zkoss.org/wiki/ZKComponentReference/Containers/Window#Popup

If you don't want to handle the popup in Java code you can use ZK's client side UI Composition in combination with a custom command function in JS code.

Here an example:

http://zkfiddle.org/sample/3a97mc3/1-customized-notification-popup

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-28 08:45:27 +0800

Seen: 13 times

Last updated: Dec 30 '19

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