The Redraw Method

From Documentation
Revision as of 04:28, 14 July 2010 by Tmillsclare (talk | contribs) (Created page with 'When a widget is attached to the DOM tree, zk.Widget#redraw is called to generate the HTML content. For example, assume you want to use HTML SPAN tag to house the content, we can…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

When a widget is attached to the DOM tree, zk.Widget#redraw is called to generate the HTML content. For example, assume you want to use HTML SPAN tag to house the content, we can do as follows.

redraw: function (out) {

out.push('<span', this.domAttrs_(), '>', this.getValue(), '');

}

The default implementation of Widget.redraw delegates to a mold method depending on the mold. In this instance we override the function to provide one implementation of redraw which doesn’t use molds.