dojox.dtl._Templated.buildRendering
dojo.require("dojox.dtl._Templated");
defined in dojox/dtl/_Templated.js
Usage
function () (view source)
var node; if(this.domNode && !this._template){ return; } if(!this._template){ var t = this.getCachedTemplate( this.templatePath, this.templateString, this._skipNodeCache ); if(t instanceof dojox.dtl.Template) { this._template = t; }else{ node = t; } } if(!node){ var nodes = dijit._Templated._createNodesFromText( this._template.render(new dojox.dtl._Context(this)) ); for(var i = 0; i < nodes.length; i++){ if(nodes[i].nodeType == 1){ node = nodes[i]; break; } } } this._attachTemplateNodes(node); var source = this.srcNodeRef; if(source && source.parentNode){ source.parentNode.replaceChild(node, source); } if(this.widgetsInTemplate){ var childWidgets = dojo.parser.parse(node); this._attachTemplateNodes(childWidgets, function(n,p){ return n[p]; }); } if(this.domNode){ dojo.place(node, this.domNode, "before"); this.destroyDescendants(); dojo._destroyElement(this.domNode); } this.domNode = node; this._fillContent(source);