The Redraw Method"

From Documentation
m
m
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{ZKComponentDevelopmentEssentialsPageHeader}}
 +
 
When a widget is attached to the DOM tree, <javadoc directory="jsdoc" method="redraw(_global_.Array)">zk.Widget</javadoc> is called to generate the HTML content. For example, assume you want to use <mp>HTML SPAN</mp> tag to house the content, we can do as follows.
 
When a widget is attached to the DOM tree, <javadoc directory="jsdoc" method="redraw(_global_.Array)">zk.Widget</javadoc> is called to generate the HTML content. For example, assume you want to use <mp>HTML SPAN</mp> tag to house the content, we can do as follows.
  
Line 8: Line 10:
  
 
The default implementation of <javadoc directory="jsdoc" method="redraw(_global_.Array)">zk.Widget</javadoc> 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.
 
The default implementation of <javadoc directory="jsdoc" method="redraw(_global_.Array)">zk.Widget</javadoc> 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.
 +
 +
{{ZKComponentDevelopmentEssentialsPageFooter}}

Latest revision as of 04:58, 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.



Last Update : 2010/08/31

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.