Run some code before ZK loader instantiates any component

Page_Initialization

To do so, you can use the tag <?init class=org.my.path.MyClass?> in the .zul class MyClass. MyClass must implement the interface Initiator / InitiatorExt and implement the method void doInit(page page, Map map);.

In this manner we can communicate with the frontend page and write and read variables from it from Java like this:

// To save a list of customers in the customer variable of the page
page.setAttribute(name != null ? name: "customers", CustomerManager.findAll());

Compose UI using components

The Include Directive is used to include the output generated by another servlet. The servlet could be anything including JSF, JSP and even another ZUML page.

There are two ways to include another ZUML document: instant and defer. The default is auto