Load-on-Demand with an Event Listener

If you prefer to create the children manually or you need to alter them dynamically, you can listen to the event indicating the children are becoming visible, and then manipulate them in the listener. For example,

<combobox id="combo" onOpen="prepare()"/>
<zscript><![CDATA[
    void prepare() {    
        if (event.isOpen() && combo.getItemCount() == 0) {        
            combo.appendItem("First Option");            
        }        
    }    
]]></zscript>