子を追加する目的がわかりません。
しかし、デフォルトでは、ウィジェットは、ライフサイクルの初期化が
1.widget。$ INIT()// JSウィジェットのコンストラクタ
2.widget.redraw_ //出力htmlのですが、それは実際には "型" です。
3.widget.bind_ //イベントをhtmlにバインドし、デスクトップをinitedします。
Compositeウィジェットを作成しようとしている場合、Dateboxのカレンダーのように を作成する場合は、Dateboxの$ init関数を参照できます。 :)
詳細情報が必要な場合はお知らせください。
https://github.com/zkoss/zk/blob/5.0/zul/src/archive/web/js/zul/db/Datebox.js
function _initPopup() {
this._pop = new zul.db.CalendarPop();
this._tm = new zul.db.CalendarTime();
this.appendChild(this._pop);
this.appendChild(this._tm);
}
$init: function() {
this.$supers('$init', arguments);
this.afterInit(_initPopup);
this.listen({onChange: this}, -1000);
},