Useful Java Utilities
In this section we introduce some of the most commonly used Java utility classes.
Retrieves the current execution (request/response).
With this method, you can create components defined in another zul file and attach them to the current page.
Redirects to another URL. If the parameter is left null, it will redirect to the current page.
Retrieves the current session.
This class offers a collection of methods which manipulate client side via AU Response.
Scrolls the parent of the given component, so the given one become visible in the view.
Display/dismiss a busy icon, so user knows server is working or has finished working on something. For example,
Clients.showBusy(window, "Waiting for server...");
Show a notification box, which is dismissed upon left click (like Popup). You can either display a global notification (bigger) or one specific to another component (smaller with arrow pointing to it).
Clients.showNotification(msg); // display a global notification box Clients.showNotification(msg, component); // display a notification box pointing to a component
You can also specify its position, style, and duration (for auto-dismiss):
Clients.showNotification(msg, type, component, position, duration);
Type determines the style of the notification box.
Here are the available positions:
|6.0.1||March 2012||Add Clients.showNotification()|