--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=undefined" />
+ <meta name="generator" content="JsDoc Toolkit" />
+
+
+ <title>JsDoc Reference - Roo.Template</title>
+
+
+ <link rel="stylesheet" type="text/css" href="../../css/roojs.css" />
+ <link rel="stylesheet" type="text/css" href="../default.css" />
+
+
+ <script type="text/javascript" src="../page.js">
+
+ </script>
+
+
+ </head>
+
+ <body onload="RooDocsPage.onload();">
+
+
+<div class="body-wrap">
+
+ <!-- ============================== links to methods. ================================= -->
+
+ <div class="top-tools">
+ <!--
+ <a class="inner-link" href="#Roo.Template-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
+ <a class="inner-link" href="#Roo.Template-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
+ <a class="inner-link" href="#Roo.Template-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
+ <a class="inner-link" href="#Roo.Template-configs"><img src="resources/s.gif" class="item-icon icon-config">Config Options</a>
+ <a class="bookmark" href="NEED_TO_CREATE_DIRECT_LINK_HREF"><img src="resources/s.gif" class="item-icon icon-fav">Direct Link</a>
+ -->
+ </div>
+
+
+<!-- ============================== inheritance Block. ================================= -->
+
+<!-- ============================== class title / details ============================ -->
+
+
+ <h1 class="classTitle">
+
+ Class Roo.Template
+ </h1>
+
+ <table cellspacing="0" class="class-summary-table">
+
+ <tr><td class="label">Package:</td><td class="hd-info">Roo</td></tr>
+
+ <tr><td class="label">Defined In:</td><td class="hd-info">
+
+ <a href="./src/Roo_Template.js.html">Roo/Template.js</a>.
+
+ </td></tr>
+ <tr><td class="label">Class:</td><td class="hd-info">Template</td></tr>
+
+
+ <tr><td class="label">Subclasses:</td><td class="hd-info">
+ <a href="./Roo.DomTemplate.html#constructor" roo:cls="Roo.DomTemplate.html#constructor">Roo.DomTemplate</a>, <a href="./Roo.MasterTemplate.html#constructor" roo:cls="Roo.MasterTemplate.html#constructor">Roo.MasterTemplate</a>, <a href="./Roo.XTemplate.html#constructor" roo:cls="Roo.XTemplate.html#constructor">Roo.XTemplate</a>
+
+
+
+ </td></tr>
+
+
+
+ </table>
+
+
+<!-- ============================== class summary ========================== -->
+ <div class="description">
+ Represents an HTML fragment template. Templates can be precompiled for greater performance.<br/>For a list of available format functions, see {<b>link</b> Roo.util.Format}.<br /><br/>Usage:<br/><pre><code><br/>var t = new Roo.Template({<br/> html : '<div name="{id}">' + <br/> '<span class="{cls}">{name:trim} {someval:this.myformat}{value:ellipsis(10)}</span>' +<br/> '</div>',<br/> myformat: function (value, allValues) {<br/> return 'XX' + value;<br/> }<br/>});<br/>t.append('some-element', {id: 'myid', cls: 'myclass', name: 'foo', value: 'bar'});<br/></code></pre><br/>For more information see this blog post with examples:<br/> <a href="http://www.cnitblog.com/seeyeah/archive/2011/12/30/38728.html/">DomHelper<br/> - Create Elements using DOM, HTML fragments and Templates</a>.
+ </div>
+
+
+<!-- ============================== Class comment block... ========================== -->
+
+<div class="comments">
+ <b>Class Comments / Notes</B> =>
+ <u onclick="parent.CommentDialog.showCommentId = 'Roo.Template';">[Add Your comment/notes about this class]</u>
+ <br/>
+ <iframe frameborder="0" id="comments-Roo" style="border: none;width:100%;"
+ src="/blog.php/GtkDjsComments/Roo.Template.html"></iframe>
+</div>
+
+
+
+<!-- ============================== config options ========================== -->
+
+
+
+
+ <div class="hr"></div>
+ <a id="Roo.Template-configs"></a>
+
+
+
+
+
+ <table cellspacing="0" class="member-table">
+ <caption>Config Options (Usually are also Properties)</caption>
+
+
+ <tr>
+ <th class="sig-header" colspan="2">Options</th>
+
+ <th class="msource-header">Defined By</th>
+ </tr>
+
+
+
+
+
+ <tr class="config-row expandable config-row-alt0 notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+ <td class="sig">
+
+ <a id="Roo.Template-cfg-html" name=".html"></a>
+ <div class="fixedFont">
+ <b class="itemname">html</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
+
+
+ </div>
+
+ <div class="mdesc">
+ <div class="short">The HTML fragment or an array of fragments to join("") or multiple arguments to join("")</div>
+ </div>
+
+ <div class="mdesc">
+ <div class="long">
+ The HTML fragment or an array of fragments to join("") or multiple arguments to join("")
+
+ </div>
+ </div>
+
+
+
+ </td>
+ <td class="msource">
+
+ Roo.Template
+
+ </td>
+ </tr>
+
+
+ <tr class="config-row expandable config-row-alt1 notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+ <td class="sig">
+
+ <a id="Roo.Template-cfg-url" name=".url"></a>
+ <div class="fixedFont">
+ <b class="itemname">url</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
+
+
+ </div>
+
+ <div class="mdesc">
+ <div class="short">The Url to load the template from.</div>
+ </div>
+
+ <div class="mdesc">
+ <div class="long">
+ The Url to load the template from. beware if you are loading from a url, the data may not be ready if you use it instantly..<br/> it should be fixed so that template is observable...
+
+ </div>
+ </div>
+
+
+
+ </td>
+ <td class="msource">
+
+ Roo.Template
+
+ </td>
+ </tr>
+
+
+ </table>
+
+
+
+
+
+
+
+
+
+ <!-- ============================== public properties ==================== -->
+
+
+
+ <a id="Roo.Template-props"></a>
+
+
+
+
+
+ <table cellspacing="0" class="member-table">
+ <caption class="Empty">Public Properties - Has None</caption>
+ </table>
+
+
+
+
+ <!-- ============================== methods summary / details ======================== -->
+
+
+ <a id="Roo.Template-methods"></a>
+ <!-- constructor?? -->
+
+ <!-- static's first
+
+
+ -->
+
+ <!-- then dynamics first -->
+
+
+
+
+
+
+ <table cellspacing="0" class="member-table">
+ <caption>Public Methods</caption>
+ <tr>
+ <th class="sig-header" colspan="2">Method</th>
+ <th class="msource-header">Defined By</th>
+
+ </tr>
+
+
+
+
+
+
+
+ <tr class="method-row config-row-alt0 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Roo-method-Template" name=".Template"></a>
+ <div class="fixedFont">
+ <span class="attributes">new <B>Roo.</B></span><b class="itemname">Template</b>
+
+ (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>cfg</i></B>)
+
+
+
+ </div>
+ <div class="mdesc">
+
+
+ <div class="short">Create a new Roo.Template</div>
+
+
+ <div class="long">
+
+
+
+ Create a new Roo.Template
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>cfg</b>
+
+ </dt>
+ <dd>- Configuration object.</dd>
+
+ </dl>
+
+
+
+
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt1 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Roo.Template-method-from" name=".from"></a>
+ <div class="fixedFont">
+ <span class="attributes">Roo.Template.</span><b class="itemname">from</b>
+
+ (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement <B><i>el</i></B>)
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Creates a template from the passed element's value (<i>display:none</i> textarea, preferred) or innerHTML.</div>
+
+
+
+ <div class="long">
+
+ Creates a template from the passed element's value (<i>display:none</i> textarea, preferred) or innerHTML.
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement</span> <b>el</b>
+
+ </dt>
+ <dd>A DOM element or its id</dd>
+
+ </dl>
+
+
+
+
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Roo.Template
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt0 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Roo.Template-method-append" name=".append"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">append</b>
+
+ (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Roo.Element <B><i>el</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>values</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>returnElement</i></B>)
+
+
+ :
+
+
+ <a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>/Roo.Element
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Applies the supplied values to the template and appends the new node(s) to el.</div>
+
+
+
+ <div class="long">
+
+ Applies the supplied values to the template and appends the new node(s) to el.
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Roo.Element</span> <b>el</b>
+
+ </dt>
+ <dd>The context element</dd>
+
+ <dt>
+ <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>values</b>
+
+ </dt>
+ <dd>The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})</dd>
+
+ <dt>
+ <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>returnElement</b>
+
+ </dt>
+ <dd>(optional) true to return a Roo.Element (defaults to undefined)</dd>
+
+ </dl>
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont"><a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>/Roo.Element</span> The new node or Element</dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Roo.Template
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt1 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Roo.Template-method-apply" name=".apply"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">apply</b>
+
+ ()
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Alias for {<b>link</b> <b>applyTemplate</b>}</div>
+
+
+
+ <div class="long">
+
+ Alias for {<b>link</b> <b>applyTemplate</b>}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Roo.Template
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt0 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Roo.Template-method-applyTemplate" name=".applyTemplate"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">applyTemplate</b>
+
+ (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>values</i></B>)
+
+
+ :
+
+
+ <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Returns an HTML fragment of this template with the specified values applied.</div>
+
+
+
+ <div class="long">
+
+ Returns an HTML fragment of this template with the specified values applied.
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>values</b>
+
+ </dt>
+ <dd>The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})</dd>
+
+ </dl>
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> The HTML fragment</dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Roo.Template
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt1 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Roo.Template-method-compile" name=".compile"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">compile</b>
+
+ ()
+
+
+ :
+
+
+ <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Compiles the template into an internal function, eliminating the RegEx overhead.</div>
+
+
+
+ <div class="long">
+
+ Compiles the template into an internal function, eliminating the RegEx overhead.
+
+
+
+
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont"><a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a></span> this</dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Roo.Template
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt0 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Roo.Template-method-insertAfter" name=".insertAfter"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">insertAfter</b>
+
+ (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Roo.Element <B><i>el</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>values</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>returnElement</i></B>)
+
+
+ :
+
+
+ <a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>/Roo.Element
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Applies the supplied values to the template and inserts the new node(s) after el.</div>
+
+
+
+ <div class="long">
+
+ Applies the supplied values to the template and inserts the new node(s) after el.
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Roo.Element</span> <b>el</b>
+
+ </dt>
+ <dd>The context element</dd>
+
+ <dt>
+ <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>values</b>
+
+ </dt>
+ <dd>The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})</dd>
+
+ <dt>
+ <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>returnElement</b>
+
+ </dt>
+ <dd>(optional) true to return a Roo.Element (defaults to undefined)</dd>
+
+ </dl>
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont"><a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>/Roo.Element</span> The new node or Element</dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Roo.Template
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt1 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Roo.Template-method-insertBefore" name=".insertBefore"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">insertBefore</b>
+
+ (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Roo.Element <B><i>el</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>values</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>returnElement</i></B>)
+
+
+ :
+
+
+ <a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>/Roo.Element
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Applies the supplied values to the template and inserts the new node(s) before el.</div>
+
+
+
+ <div class="long">
+
+ Applies the supplied values to the template and inserts the new node(s) before el.
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Roo.Element</span> <b>el</b>
+
+ </dt>
+ <dd>The context element</dd>
+
+ <dt>
+ <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>values</b>
+
+ </dt>
+ <dd>The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})</dd>
+
+ <dt>
+ <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>returnElement</b>
+
+ </dt>
+ <dd>(optional) true to return a Roo.Element (defaults to undefined)</dd>
+
+ </dl>
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont"><a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>/Roo.Element</span> The new node or Element</dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Roo.Template
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt0 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Roo.Template-method-insertFirst" name=".insertFirst"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">insertFirst</b>
+
+ (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Roo.Element <B><i>el</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>values</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>returnElement</i></B>)
+
+
+ :
+
+
+ <a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>/Roo.Element
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Applies the supplied values to the template and inserts the new node(s) as the first child of el.</div>
+
+
+
+ <div class="long">
+
+ Applies the supplied values to the template and inserts the new node(s) as the first child of el.
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Roo.Element</span> <b>el</b>
+
+ </dt>
+ <dd>The context element</dd>
+
+ <dt>
+ <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>values</b>
+
+ </dt>
+ <dd>The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})</dd>
+
+ <dt>
+ <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>returnElement</b>
+
+ </dt>
+ <dd>(optional) true to return a Roo.Element (defaults to undefined)</dd>
+
+ </dl>
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont"><a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>/Roo.Element</span> The new node or Element</dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Roo.Template
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt1 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Roo.Template-method-overwrite" name=".overwrite"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">overwrite</b>
+
+ (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Roo.Element <B><i>el</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>values</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>returnElement</i></B>)
+
+
+ :
+
+
+ <a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>/Roo.Element
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Applies the supplied values to the template and overwrites the content of el with the new node(s).</div>
+
+
+
+ <div class="long">
+
+ Applies the supplied values to the template and overwrites the content of el with the new node(s).
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Roo.Element</span> <b>el</b>
+
+ </dt>
+ <dd>The context element</dd>
+
+ <dt>
+ <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>values</b>
+
+ </dt>
+ <dd>The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})</dd>
+
+ <dt>
+ <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>returnElement</b>
+
+ </dt>
+ <dd>(optional) true to return a Roo.Element (defaults to undefined)</dd>
+
+ </dl>
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont"><a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>/Roo.Element</span> The new node or Element</dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Roo.Template
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt0 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Roo.Template-method-set" name=".set"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">set</b>
+
+ (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>html</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>compile</i></B>)
+
+
+ :
+
+
+ <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Sets the HTML used as the template and optionally compiles it.</div>
+
+
+
+ <div class="long">
+
+ Sets the HTML used as the template and optionally compiles it.
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>html</b>
+
+ </dt>
+ <dd></dd>
+
+ <dt>
+ <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>compile</b>
+
+ </dt>
+ <dd>(optional) True to compile the template (defaults to undefined)</dd>
+
+ </dl>
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont"><a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a></span> this</dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Roo.Template
+
+ </td>
+ </tr>
+
+
+ </table>
+
+
+ <!-- ============================== events summary / details ======================== -->
+
+
+ <a id="Roo.Template-events"></a>
+
+
+
+
+
+ <table cellspacing="0" class="member-table">
+ <caption class="Empty">Events - Has None</caption>
+ </table>
+
+
+
+
+
+
+
+
+
+<!-- ============================== footer ================================= -->
+ <div class="fineprint" style="clear:both">
+
+ Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Fri Jul 13 2018 14:10:53 GMT+0800 (HKT)
+ Based on
+ <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>
+ </div>
+ </body>
+</html>