Class HtmlMacroComponent

  • All Implemented Interfaces:, java.lang.Cloneable, Component, AfterCompose, DynamicPropertied, Macro, Scope, IdSpace, ComponentCtrl

    public class HtmlMacroComponent
    extends HtmlBasedComponent
    implements Macro
    The implementation of a macro component for HTML-based clients.

    Generally, a macro component is created automatically by ZK loader. If a developer wants to create it manually, it has to instantiate from the correct class, and then invoke afterCompose().

    To do additional application-specific tasks, you could override compose(). Both afterCompose() and recreate() depends on compose().

    By default, compose() will wire members by use of Selectors. In other words, it will wire annotated members the same way as SelectorComposer does.

    If you prefer to wire the members based on the name convention as GenericForwardComposer does (i.e., backward compatible with ZK 5), you could specify a library property called org.zkoss.zk.ui.macro.autowire.convention to true in WEB-INF/zk.xml as follows.


    If you prefer not to wire at all (neither by-selector nor by-convention), you could specify a library property called org.zkoss.zk.ui.macro.autowire.disabled to true in WEB-INF/zk.xml as follows..

    See Also:
    Serialized Form
    • Field Detail

      • _resolvers

        protected final java.util.List<VariableResolver> _resolvers
        A list of resolvers (never null). A variable resolver is added automatically if VariableResolver was annotated.
    • Constructor Detail

      • HtmlMacroComponent

        public HtmlMacroComponent()