Home   Single Page

The use Attribute

If you prefer not to use any Java codes in the ZUML pages, you can extend the implementation of a component to handle the events as follows.

import org.zkoss.zul.Window;

public class MyWindow extends Window {
    public void onCreate() { //does initialization    
    public void onOK() { //save the result    
    public void onCancel() { //cancel any changes    

Then, specify the class with the use attribute as shown below.

<window use="MyWindow">