The Redraw Method"
From Documentation
Tmillsclare (talk | contribs) m |
Tmillsclare (talk | contribs) m |
||
Line 13: | Line 13: | ||
{{ZKComponentDevelopmentEssentialsPageFooter}} | {{ZKComponentDevelopmentEssentialsPageFooter}} | ||
− | <javadoc | + | <javadoc method="redraw(_global_.Array)''>zk.Widget</javadoc> |
Revision as of 04:53, 31 August 2010
When a widget is attached to the DOM tree, Widget.redraw(Array) 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(), '</span>');
}
The default implementation of Widget.redraw(Array) 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.