zk: when to create widget children? -


first off: i'm new zk. try create component lot of client side processing (think image editing). therefore, create widget creates it's own child widgets @ 'construction time'.

but although find lot of documentation on how instantiate widgets, fail find hint on when it. in other words:

how zk call widget, method should override in widget javascript generate children?

not sure what's purpose adding child.

but default widget initialize lifecycle

1.widget.$init() //js widget constructor

2.widget.redraw_ // output html , it's "mold" .

3.widget.bind_ // binding event html , , desktop inited.

if planing build composite widget , calendar in datebox , reference $init function in datebox. :)

let me know if need further information.

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); }, 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -