-
FEATURED COMPONENTS
First time here? Check out the FAQ!
It would be nice if the Notification.show() to display header, body and footer content too instead of plain text only
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
Asked: 2019-12-28 08:45:27 +0800
Seen: 13 times
Last updated: Dec 30 '19