--- /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.XTemplate</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.XTemplate-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
+ <a class="inner-link" href="#Roo.XTemplate-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
+ <a class="inner-link" href="#Roo.XTemplate-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
+ <a class="inner-link" href="#Roo.XTemplate-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. ================================= -->
+
+ <div class="inheritance res-block">
+ <pre class="res-block-inner"><a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
+<img src="../../images/default/s.gif" height="1" width="20"/><img class="elbow" src="../../images/default/tree/elbow-end.gif"/>Roo.XTemplate
+
+ </pre>
+ </div>
+
+<!-- ============================== class title / details ============================ -->
+
+
+ <h1 class="classTitle">
+
+ Class Roo.XTemplate
+ </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_XTemplate.js.html">Roo/XTemplate.js</a>.
+
+ </td></tr>
+ <tr><td class="label">Class:</td><td class="hd-info">XTemplate</td></tr>
+
+
+
+
+ <tr><td class="label">Extends:</td><td class="hd-info">
+ <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
+
+ </td></tr>
+
+
+ </table>
+
+
+<!-- ============================== class summary ========================== -->
+ <div class="description">
+ Provides a template that can have nested templates for loops or conditionals. The syntax is:<br/><pre><code><br/>var t = new Roo.XTemplate(<br/> '<select name="{name}">',<br/> '<tpl for="options"><option value="{value:trim}">{text:ellipsis(10)}</option></tpl>',<br/> '</select>'<br/>);<br/> <br/>// then append, applying the master template values<br/> </code></pre><br/><br/>Supported features:<br/><br/> Tags:<br/><br/><pre><code><br/> {a_variable} - output encoded.<br/> {a_variable.format:("Y-m-d")} - call a method on the variable<br/> {a_variable:raw} - unencoded output<br/> {a_variable:toFixed(1,2)} - Roo.util.Format."toFixed"<br/> {a_variable:this.method_on_template(...)} - call a method on the template object.<br/> <br/></code></pre><br/> The tpl tag:<br/><pre><code><br/> <tpl for="a_variable or condition.."></tpl><br/> <tpl if="a_variable or condition"></tpl><br/> <tpl exec="some javascript"></tpl><br/> <tpl name="named_template"></tpl> (experimental)<br/> <br/> <tpl for="."></tpl> - just iterate the property..<br/> <tpl for=".."></tpl> - iterates with the parent (probably the template) <br/></code></pre>
+ </div>
+
+
+<!-- ============================== Class comment block... ========================== -->
+
+<div class="comments">
+ <b>Class Comments / Notes</B> =>
+ <u onclick="parent.CommentDialog.showCommentId = 'Roo.XTemplate';">[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.XTemplate.html"></iframe>
+</div>
+
+
+
+<!-- ============================== config options ========================== -->
+
+
+
+
+ <div class="hr"></div>
+ <a id="Roo.XTemplate-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">
+ <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">
+
+ <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
+
+ </td>
+ </tr>
+
+
+ <tr class="config-row expandable config-row-alt1">
+ <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">
+
+ <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
+
+ </td>
+ </tr>
+
+
+ </table>
+
+
+
+
+
+
+
+
+
+ <!-- ============================== public properties ==================== -->
+
+
+
+ <a id="Roo.XTemplate-props"></a>
+
+
+
+
+
+ <table cellspacing="0" class="member-table">
+ <caption class="Empty">Public Properties - Has None</caption>
+ </table>
+
+
+
+
+ <!-- ============================== methods summary / details ======================== -->
+
+
+ <a id="Roo.XTemplate-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 notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Roo-method-XTemplate" name=".XTemplate"></a>
+ <div class="fixedFont">
+ <span class="attributes">new <B>Roo.</B></span><b class="itemname">XTemplate</b>
+
+ ()
+
+
+
+ </div>
+ <div class="mdesc">
+
+
+ <div class="short">Create a new Roo.XTemplate</div>
+
+
+ <div class="long">
+
+
+
+ Create a new Roo.XTemplate
+
+
+
+
+
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt1 expandable">
+ <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">
+
+ <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt0 expandable">
+ <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">
+
+ <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
+
+ </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.XTemplate-method-applySubTemplate" name=".applySubTemplate"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">applySubTemplate</b>
+
+ (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>id</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:Object">Object</a> <B><i>parent</i></B>)
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">same as applyTemplate, except it's done to one of the subTemplates<br/>when using named templates, you can do:<br/><br/>var str = pl.applySubTemplate('your-name', values);</div>
+
+
+
+ <div class="long">
+
+ same as applyTemplate, except it's done to one of the subTemplates<br/>when using named templates, you can do:<br/><br/>var str = pl.applySubTemplate('your-name', values);
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>id</b>
+
+ </dt>
+ <dd>of the template</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>to apply to template</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>parent</b>
+
+ </dt>
+ <dd>(normaly the instance of this object)</dd>
+
+ </dl>
+
+
+
+
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Roo.XTemplate
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt0 expandable">
+ <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">
+
+ <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
+
+ </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.XTemplate-method-compile" name=".compile"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">compile</b>
+
+ ()
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">compile the template<br/><br/>This is not recursive, so I'm not sure how nested templates are really going to be handled.</div>
+
+
+
+ <div class="long">
+
+ compile the template<br/><br/>This is not recursive, so I'm not sure how nested templates are really going to be handled..
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Roo.XTemplate
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt0 expandable">
+ <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">
+
+ <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt1 expandable">
+ <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">
+
+ <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt0 expandable">
+ <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">
+
+ <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt1 expandable">
+ <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">
+
+ <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt0 expandable">
+ <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">
+
+ <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
+
+ </td>
+ </tr>
+
+
+ </table>
+
+
+ <!-- ============================== events summary / details ======================== -->
+
+
+ <a id="Roo.XTemplate-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>