Html Macro Component

Employment/Purpose

The Html Macro Component serves as the base class for macro components in ZK. By default, invoking the afterCompose() method of org.zkoss.zk.ui.HtmlMacroComponent supports auto forwarding events and wiring accessible variables to the component. This feature facilitates the development of reusable components with predefined behaviors, reducing the amount of manual coding required for event handling and variable access.

Example

The Html Macro Component example demonstrates the creation of a reusable “Username” macro component containing a Button component that responds to the onClick event.

  1. macro.zul: ```xml