55f632c4ce851989d909db7e9fdf4e3af2449e39
[roojs1] / docs / symbols / Roo.XTemplate.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
3
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
6         <head>
7                 <meta http-equiv="content-type" content="text/html; charset=undefined" />
8                 <meta name="generator" content="JsDoc Toolkit" />
9                 
10                 
11                 <title>JsDoc Reference - Roo.XTemplate</title>
12                 
13                 
14         <link rel="stylesheet" type="text/css" href="../../css/roojs.css" />            
15         <link rel="stylesheet" type="text/css" href="../default.css" />
16         
17         
18         <script type="text/javascript" src="../page.js">
19         
20         </script>
21          
22                 
23         </head>
24
25         <body onload="RooDocsPage.onload();">
26          
27         
28 <div class="body-wrap">
29
30     <!-- ============================== links to methods. ================================= --> 
31
32     <div class="top-tools">
33     <!--
34         <a class="inner-link" href="#Roo.XTemplate-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
35         <a class="inner-link" href="#Roo.XTemplate-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
36         <a class="inner-link" href="#Roo.XTemplate-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
37         <a class="inner-link" href="#Roo.XTemplate-configs"><img src="resources/s.gif" class="item-icon icon-config">Config Options</a>
38         <a class="bookmark" href="NEED_TO_CREATE_DIRECT_LINK_HREF"><img src="resources/s.gif" class="item-icon icon-fav">Direct Link</a>
39         -->
40     </div>
41
42     
43 <!-- ============================== inheritance Block. ================================= -->    
44         
45                 <div class="inheritance res-block">
46                    <pre class="res-block-inner"><a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
47 <img src="../../images/default/s.gif" height="1"  width="20"/><img class="elbow" src="../../images/default/tree/elbow-end.gif"/>Roo.XTemplate 
48
49                    </pre>
50                 </div>
51        
52 <!-- ============================== class title / details ============================ -->
53     
54     
55     <h1 class="classTitle">
56                                 
57                                 Class Roo.XTemplate
58                         </h1>
59                         
60     <table cellspacing="0" class="class-summary-table">
61         
62                 <tr><td class="label">Package:</td><td class="hd-info">Roo</td></tr>
63         
64         <tr><td class="label">Defined In:</td><td class="hd-info">
65                         
66                                         <a href="./src/Roo_XTemplate.js.html">Roo/XTemplate.js</a>.
67                         
68         </td></tr>
69         <tr><td class="label">Class:</td><td class="hd-info">XTemplate</td></tr>
70         
71         
72         
73         
74                 <tr><td class="label">Extends:</td><td class="hd-info">
75                         <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
76         
77                 </td></tr>    
78         
79         
80     </table>
81
82     
83 <!-- ============================== class summary ========================== -->                        
84     <div class="description">
85         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/>        '&lt;select name="{name}"&gt;',<br/>            '&lt;tpl for="options"&gt;&lt;option value="{value:trim}"&gt;{text:ellipsis(10)}&lt;/option&gt;&lt;/tpl&gt;',<br/>      '&lt;/select&gt;'<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/>        &lt;tpl for="a_variable or condition.."&gt;&lt;/tpl&gt;<br/>        &lt;tpl if="a_variable or condition"&gt;&lt;/tpl&gt;<br/>        &lt;tpl exec="some javascript"&gt;&lt;/tpl&gt;<br/>        &lt;tpl name="named_template"&gt;&lt;/tpl&gt; (experimental)<br/>  <br/>        &lt;tpl for="."&gt;&lt;/tpl&gt; - just iterate the property..<br/>        &lt;tpl for=".."&gt;&lt;/tpl&gt; - iterates with the parent (probably the template) <br/></code></pre>
86     </div>
87
88         
89 <!-- ============================== Class comment block... ========================== -->                                       
90
91 <div class="comments">
92         <b>Class Comments / Notes</B> =>  
93         <u onclick="parent.CommentDialog.showCommentId = 'Roo.XTemplate';">[Add Your comment/notes about this class]</u>
94         <br/>
95         <iframe frameborder="0"  id="comments-Roo" style="border: none;width:100%;" 
96                 src="/blog.php/GtkDjsComments/Roo.XTemplate.html"></iframe>
97 </div>
98         
99
100                 
101 <!-- ============================== config options ========================== -->                                               
102                  
103     
104     
105                 
106     <div class="hr"></div>
107     <a id="Roo.XTemplate-configs"></a>
108                 
109     
110      
111     
112         
113       <table cellspacing="0" class="member-table">   
114       <caption>Config Options (Usually are also Properties)</caption>
115     
116         
117         <tr>
118             <th class="sig-header" colspan="2">Options</th>
119             
120             <th class="msource-header">Defined By</th>
121         </tr>
122         
123         
124         
125         
126         
127                 <tr class="config-row expandable config-row-alt0">
128                    <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
129                     <td class="sig">
130
131                         <a id="Roo.Template-cfg-html" name=".html"></a>
132                         <div class="fixedFont">
133                                 <b  class="itemname">html</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
134                                 
135                                 
136                         </div>
137                   
138                         <div class="mdesc">
139                             <div class="short">The HTML fragment or an array of fragments to join("") or multiple arguments to join("")</div> 
140                         </div>
141                         
142                         <div class="mdesc">
143                             <div class="long">The HTML fragment or an array of fragments to join("") or multiple arguments to join("")</div> 
144                         </div>
145                         
146                         
147
148                     </td>
149                     <td class="msource">
150                         
151                         <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
152                                 
153                     </td>
154                 </tr>
155         
156         
157                 <tr class="config-row expandable config-row-alt1">
158                    <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
159                     <td class="sig">
160
161                         <a id="Roo.Template-cfg-url" name=".url"></a>
162                         <div class="fixedFont">
163                                 <b  class="itemname">url</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
164                                 
165                                 
166                         </div>
167                   
168                         <div class="mdesc">
169                             <div class="short">The Url to load the template from.</div> 
170                         </div>
171                         
172                         <div class="mdesc">
173                             <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> 
174                         </div>
175                         
176                         
177
178                     </td>
179                     <td class="msource">
180                         
181                         <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
182                                 
183                     </td>
184                 </tr>
185         
186         
187     </table>
188                 
189   
190   
191   
192   
193   
194   
195   
196   
197   <!-- ============================== public properties ==================== -->        
198   
199   
200   
201     <a id="Roo.XTemplate-props"></a>      
202     
203     
204
205     
206     
207      <table cellspacing="0" class="member-table">
208       <caption class="Empty">Public Properties - Has None</caption>
209      </table>
210     
211     
212      
213     
214   <!-- ============================== methods summary / details ======================== -->
215   
216   
217   <a id="Roo.XTemplate-methods"></a>
218         <!-- constructor?? -->
219         
220         <!-- static's first 
221         
222         
223         -->
224         
225         <!-- then dynamics first -->
226         
227   
228   
229     
230     
231     
232       <table cellspacing="0" class="member-table">
233       <caption>Public Methods</caption>
234         <tr>
235             <th class="sig-header" colspan="2">Method</th>            
236             <th class="msource-header">Defined By</th>
237
238         </tr>
239         
240         
241         
242          
243         
244         
245           
246           <tr class="method-row config-row-alt0 notInherited">
247             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
248            
249            
250             <td class="sig">
251                 <a id="Roo-method-XTemplate"   name=".XTemplate"></a>
252                 <div class="fixedFont">
253                         <span class="attributes">new <B>Roo.</B></span><b class="itemname">XTemplate</b>
254                                 
255                                  () 
256                         
257                                 
258                         
259                 </div>
260                 <div class="mdesc">
261                 
262                  
263                         <div class="short">Create a new Roo.XTemplate</div> 
264                  
265                  
266                     <div class="long">
267                         
268                         
269                         
270                                 Create a new Roo.XTemplate
271                         
272                         
273                         
274                         
275                         
276                         
277                         
278                         
279
280                     
281                     
282                      
283                     </div>                    
284                 </div>
285
286             </td>
287             <td class="msource">
288                 &nbsp;
289             </td>
290         </tr>
291         
292           
293           <tr class="method-row config-row-alt1 expandable">
294             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
295            
296            
297             <td class="sig">
298                 <a id="Roo.Template-method-append"   name=".append"></a>
299                 <div class="fixedFont">
300                         <span class="attributes"></span><b class="itemname">append</b>
301                                 
302                                  (<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>) 
303                         
304                                 
305                                          : 
306                                         
307                                                 
308                                                 <a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>/Roo.Element
309                                         
310                                         
311                                         
312                                 
313                         
314                 </div>
315                 <div class="mdesc">
316                 
317                    <div class="short">Applies the supplied values to the template and appends the new node(s) to el.</div> 
318                  
319                  
320                  
321                     <div class="long">
322                         
323                                 Applies the supplied values to the template and appends the new node(s) to el.
324                     
325                                 
326                         
327                         
328                         
329                         
330                                 <dl class="detailList">
331                                 <dt class="heading">Parameters:</dt>
332                                 
333                                         <dt>
334                                                 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Roo.Element</span>  <b>el</b>
335                                                 
336                                         </dt>
337                                         <dd>The context element</dd>
338                                 
339                                         <dt>
340                                                 <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>
341                                                 
342                                         </dt>
343                                         <dd>The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})</dd>
344                                 
345                                         <dt>
346                                                 <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>
347                                                 
348                                         </dt>
349                                         <dd>(optional) true to return a Roo.Element (defaults to undefined)</dd>
350                                 
351                                 </dl>
352                         
353                         
354                         
355                         
356                         
357                                 <dl class="detailList">
358                                 <dt class="heading">Returns:</dt>
359                                 
360                                         <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>
361                                 
362                                 </dl>
363                         
364                         
365                         
366
367                     
368                     
369                      
370                     </div>                    
371                 </div>
372
373             </td>
374             <td class="msource">
375                 
376                         <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
377                 &nbsp;
378             </td>
379         </tr>
380         
381           
382           <tr class="method-row config-row-alt0 expandable">
383             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
384            
385            
386             <td class="sig">
387                 <a id="Roo.Template-method-apply"   name=".apply"></a>
388                 <div class="fixedFont">
389                         <span class="attributes"></span><b class="itemname">apply</b>
390                                 
391                                  () 
392                         
393                                 
394                         
395                 </div>
396                 <div class="mdesc">
397                 
398                    <div class="short">Alias for {<b>link</b> <b>applyTemplate</b>}</div> 
399                  
400                  
401                  
402                     <div class="long">
403                         
404                                 Alias for {<b>link</b> <b>applyTemplate</b>}
405                     
406                                 
407                         
408                         
409                         
410                         
411                         
412                         
413                         
414                         
415                         
416                         
417
418                     
419                     
420                      
421                     </div>                    
422                 </div>
423
424             </td>
425             <td class="msource">
426                 
427                         <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
428                 &nbsp;
429             </td>
430         </tr>
431         
432           
433           <tr class="method-row config-row-alt1 expandable notInherited">
434             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
435            
436            
437             <td class="sig">
438                 <a id="Roo.XTemplate-method-applySubTemplate"   name=".applySubTemplate"></a>
439                 <div class="fixedFont">
440                         <span class="attributes"></span><b class="itemname">applySubTemplate</b>
441                                 
442                                  (<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>) 
443                         
444                                 
445                         
446                 </div>
447                 <div class="mdesc">
448                 
449                    <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> 
450                  
451                  
452                  
453                     <div class="long">
454                         
455                                 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);
456                     
457                                 
458                         
459                         
460                         
461                         
462                                 <dl class="detailList">
463                                 <dt class="heading">Parameters:</dt>
464                                 
465                                         <dt>
466                                                 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span>  <b>id</b>
467                                                 
468                                         </dt>
469                                         <dd>of the template</dd>
470                                 
471                                         <dt>
472                                                 <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>
473                                                 
474                                         </dt>
475                                         <dd>to apply to template</dd>
476                                 
477                                         <dt>
478                                                 <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>
479                                                 
480                                         </dt>
481                                         <dd>(normaly the instance of this object)</dd>
482                                 
483                                 </dl>
484                         
485                         
486                         
487                         
488                         
489                         
490                         
491
492                     
493                     
494                      
495                     </div>                    
496                 </div>
497
498             </td>
499             <td class="msource">
500                 
501                         Roo.XTemplate
502                 &nbsp;
503             </td>
504         </tr>
505         
506           
507           <tr class="method-row config-row-alt0 expandable">
508             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
509            
510            
511             <td class="sig">
512                 <a id="Roo.Template-method-applyTemplate"   name=".applyTemplate"></a>
513                 <div class="fixedFont">
514                         <span class="attributes"></span><b class="itemname">applyTemplate</b>
515                                 
516                                  (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>values</i></B>) 
517                         
518                                 
519                                          : 
520                                         
521                                                 
522                                                 <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
523                                         
524                                         
525                                         
526                                 
527                         
528                 </div>
529                 <div class="mdesc">
530                 
531                    <div class="short">Returns an HTML fragment of this template with the specified values applied.</div> 
532                  
533                  
534                  
535                     <div class="long">
536                         
537                                 Returns an HTML fragment of this template with the specified values applied.
538                     
539                                 
540                         
541                         
542                         
543                         
544                                 <dl class="detailList">
545                                 <dt class="heading">Parameters:</dt>
546                                 
547                                         <dt>
548                                                 <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>
549                                                 
550                                         </dt>
551                                         <dd>The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})</dd>
552                                 
553                                 </dl>
554                         
555                         
556                         
557                         
558                         
559                                 <dl class="detailList">
560                                 <dt class="heading">Returns:</dt>
561                                 
562                                         <dd><span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>  The HTML fragment</dd>
563                                 
564                                 </dl>
565                         
566                         
567                         
568
569                     
570                     
571                      
572                     </div>                    
573                 </div>
574
575             </td>
576             <td class="msource">
577                 
578                         <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
579                 &nbsp;
580             </td>
581         </tr>
582         
583           
584           <tr class="method-row config-row-alt1 expandable notInherited">
585             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
586            
587            
588             <td class="sig">
589                 <a id="Roo.XTemplate-method-compile"   name=".compile"></a>
590                 <div class="fixedFont">
591                         <span class="attributes"></span><b class="itemname">compile</b>
592                                 
593                                  () 
594                         
595                                 
596                         
597                 </div>
598                 <div class="mdesc">
599                 
600                    <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> 
601                  
602                  
603                  
604                     <div class="long">
605                         
606                                 compile the template<br/><br/>This is not recursive, so I'm not sure how nested templates are really going to be handled..
607                     
608                                 
609                         
610                         
611                         
612                         
613                         
614                         
615                         
616                         
617                         
618                         
619
620                     
621                     
622                      
623                     </div>                    
624                 </div>
625
626             </td>
627             <td class="msource">
628                 
629                         Roo.XTemplate
630                 &nbsp;
631             </td>
632         </tr>
633         
634           
635           <tr class="method-row config-row-alt0 expandable">
636             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
637            
638            
639             <td class="sig">
640                 <a id="Roo.Template-method-insertAfter"   name=".insertAfter"></a>
641                 <div class="fixedFont">
642                         <span class="attributes"></span><b class="itemname">insertAfter</b>
643                                 
644                                  (<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>) 
645                         
646                                 
647                                          : 
648                                         
649                                                 
650                                                 <a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>/Roo.Element
651                                         
652                                         
653                                         
654                                 
655                         
656                 </div>
657                 <div class="mdesc">
658                 
659                    <div class="short">Applies the supplied values to the template and inserts the new node(s) after el.</div> 
660                  
661                  
662                  
663                     <div class="long">
664                         
665                                 Applies the supplied values to the template and inserts the new node(s) after el.
666                     
667                                 
668                         
669                         
670                         
671                         
672                                 <dl class="detailList">
673                                 <dt class="heading">Parameters:</dt>
674                                 
675                                         <dt>
676                                                 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Roo.Element</span>  <b>el</b>
677                                                 
678                                         </dt>
679                                         <dd>The context element</dd>
680                                 
681                                         <dt>
682                                                 <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>
683                                                 
684                                         </dt>
685                                         <dd>The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})</dd>
686                                 
687                                         <dt>
688                                                 <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>
689                                                 
690                                         </dt>
691                                         <dd>(optional) true to return a Roo.Element (defaults to undefined)</dd>
692                                 
693                                 </dl>
694                         
695                         
696                         
697                         
698                         
699                                 <dl class="detailList">
700                                 <dt class="heading">Returns:</dt>
701                                 
702                                         <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>
703                                 
704                                 </dl>
705                         
706                         
707                         
708
709                     
710                     
711                      
712                     </div>                    
713                 </div>
714
715             </td>
716             <td class="msource">
717                 
718                         <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
719                 &nbsp;
720             </td>
721         </tr>
722         
723           
724           <tr class="method-row config-row-alt1 expandable">
725             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
726            
727            
728             <td class="sig">
729                 <a id="Roo.Template-method-insertBefore"   name=".insertBefore"></a>
730                 <div class="fixedFont">
731                         <span class="attributes"></span><b class="itemname">insertBefore</b>
732                                 
733                                  (<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>) 
734                         
735                                 
736                                          : 
737                                         
738                                                 
739                                                 <a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>/Roo.Element
740                                         
741                                         
742                                         
743                                 
744                         
745                 </div>
746                 <div class="mdesc">
747                 
748                    <div class="short">Applies the supplied values to the template and inserts the new node(s) before el.</div> 
749                  
750                  
751                  
752                     <div class="long">
753                         
754                                 Applies the supplied values to the template and inserts the new node(s) before el.
755                     
756                                 
757                         
758                         
759                         
760                         
761                                 <dl class="detailList">
762                                 <dt class="heading">Parameters:</dt>
763                                 
764                                         <dt>
765                                                 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Roo.Element</span>  <b>el</b>
766                                                 
767                                         </dt>
768                                         <dd>The context element</dd>
769                                 
770                                         <dt>
771                                                 <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>
772                                                 
773                                         </dt>
774                                         <dd>The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})</dd>
775                                 
776                                         <dt>
777                                                 <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>
778                                                 
779                                         </dt>
780                                         <dd>(optional) true to return a Roo.Element (defaults to undefined)</dd>
781                                 
782                                 </dl>
783                         
784                         
785                         
786                         
787                         
788                                 <dl class="detailList">
789                                 <dt class="heading">Returns:</dt>
790                                 
791                                         <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>
792                                 
793                                 </dl>
794                         
795                         
796                         
797
798                     
799                     
800                      
801                     </div>                    
802                 </div>
803
804             </td>
805             <td class="msource">
806                 
807                         <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
808                 &nbsp;
809             </td>
810         </tr>
811         
812           
813           <tr class="method-row config-row-alt0 expandable">
814             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
815            
816            
817             <td class="sig">
818                 <a id="Roo.Template-method-insertFirst"   name=".insertFirst"></a>
819                 <div class="fixedFont">
820                         <span class="attributes"></span><b class="itemname">insertFirst</b>
821                                 
822                                  (<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>) 
823                         
824                                 
825                                          : 
826                                         
827                                                 
828                                                 <a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>/Roo.Element
829                                         
830                                         
831                                         
832                                 
833                         
834                 </div>
835                 <div class="mdesc">
836                 
837                    <div class="short">Applies the supplied values to the template and inserts the new node(s) as the first child of el.</div> 
838                  
839                  
840                  
841                     <div class="long">
842                         
843                                 Applies the supplied values to the template and inserts the new node(s) as the first child of el.
844                     
845                                 
846                         
847                         
848                         
849                         
850                                 <dl class="detailList">
851                                 <dt class="heading">Parameters:</dt>
852                                 
853                                         <dt>
854                                                 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Roo.Element</span>  <b>el</b>
855                                                 
856                                         </dt>
857                                         <dd>The context element</dd>
858                                 
859                                         <dt>
860                                                 <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>
861                                                 
862                                         </dt>
863                                         <dd>The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})</dd>
864                                 
865                                         <dt>
866                                                 <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>
867                                                 
868                                         </dt>
869                                         <dd>(optional) true to return a Roo.Element (defaults to undefined)</dd>
870                                 
871                                 </dl>
872                         
873                         
874                         
875                         
876                         
877                                 <dl class="detailList">
878                                 <dt class="heading">Returns:</dt>
879                                 
880                                         <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>
881                                 
882                                 </dl>
883                         
884                         
885                         
886
887                     
888                     
889                      
890                     </div>                    
891                 </div>
892
893             </td>
894             <td class="msource">
895                 
896                         <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
897                 &nbsp;
898             </td>
899         </tr>
900         
901           
902           <tr class="method-row config-row-alt1 expandable">
903             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
904            
905            
906             <td class="sig">
907                 <a id="Roo.Template-method-overwrite"   name=".overwrite"></a>
908                 <div class="fixedFont">
909                         <span class="attributes"></span><b class="itemname">overwrite</b>
910                                 
911                                  (<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>) 
912                         
913                                 
914                                          : 
915                                         
916                                                 
917                                                 <a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>/Roo.Element
918                                         
919                                         
920                                         
921                                 
922                         
923                 </div>
924                 <div class="mdesc">
925                 
926                    <div class="short">Applies the supplied values to the template and overwrites the content of el with the new node(s).</div> 
927                  
928                  
929                  
930                     <div class="long">
931                         
932                                 Applies the supplied values to the template and overwrites the content of el with the new node(s).
933                     
934                                 
935                         
936                         
937                         
938                         
939                                 <dl class="detailList">
940                                 <dt class="heading">Parameters:</dt>
941                                 
942                                         <dt>
943                                                 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Roo.Element</span>  <b>el</b>
944                                                 
945                                         </dt>
946                                         <dd>The context element</dd>
947                                 
948                                         <dt>
949                                                 <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>
950                                                 
951                                         </dt>
952                                         <dd>The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})</dd>
953                                 
954                                         <dt>
955                                                 <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>
956                                                 
957                                         </dt>
958                                         <dd>(optional) true to return a Roo.Element (defaults to undefined)</dd>
959                                 
960                                 </dl>
961                         
962                         
963                         
964                         
965                         
966                                 <dl class="detailList">
967                                 <dt class="heading">Returns:</dt>
968                                 
969                                         <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>
970                                 
971                                 </dl>
972                         
973                         
974                         
975
976                     
977                     
978                      
979                     </div>                    
980                 </div>
981
982             </td>
983             <td class="msource">
984                 
985                         <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
986                 &nbsp;
987             </td>
988         </tr>
989         
990           
991           <tr class="method-row config-row-alt0 expandable">
992             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
993            
994            
995             <td class="sig">
996                 <a id="Roo.Template-method-set"   name=".set"></a>
997                 <div class="fixedFont">
998                         <span class="attributes"></span><b class="itemname">set</b>
999                                 
1000                                  (<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>) 
1001                         
1002                                 
1003                                          : 
1004                                         
1005                                                 
1006                                                 <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
1007                                         
1008                                         
1009                                         
1010                                 
1011                         
1012                 </div>
1013                 <div class="mdesc">
1014                 
1015                    <div class="short">Sets the HTML used as the template and optionally compiles it.</div> 
1016                  
1017                  
1018                  
1019                     <div class="long">
1020                         
1021                                 Sets the HTML used as the template and optionally compiles it.
1022                     
1023                                 
1024                         
1025                         
1026                         
1027                         
1028                                 <dl class="detailList">
1029                                 <dt class="heading">Parameters:</dt>
1030                                 
1031                                         <dt>
1032                                                 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>  <b>html</b>
1033                                                 
1034                                         </dt>
1035                                         <dd></dd>
1036                                 
1037                                         <dt>
1038                                                 <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>
1039                                                 
1040                                         </dt>
1041                                         <dd>(optional) True to compile the template (defaults to undefined)</dd>
1042                                 
1043                                 </dl>
1044                         
1045                         
1046                         
1047                         
1048                         
1049                                 <dl class="detailList">
1050                                 <dt class="heading">Returns:</dt>
1051                                 
1052                                         <dd><span class="fixedFont"><a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a></span>  this</dd>
1053                                 
1054                                 </dl>
1055                         
1056                         
1057                         
1058
1059                     
1060                     
1061                      
1062                     </div>                    
1063                 </div>
1064
1065             </td>
1066             <td class="msource">
1067                 
1068                         <a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
1069                 &nbsp;
1070             </td>
1071         </tr>
1072         
1073                                                        
1074     </table>
1075
1076   
1077   <!-- ============================== events summary / details ======================== -->
1078   
1079   
1080   <a id="Roo.XTemplate-events"></a>
1081     
1082   
1083         
1084    
1085     
1086      <table cellspacing="0" class="member-table">
1087       <caption class="Empty">Events - Has None</caption>
1088      </table>
1089     
1090     
1091   
1092     
1093     
1094   
1095   
1096   
1097  
1098 <!-- ============================== footer ================================= -->
1099                 <div class="fineprint" style="clear:both">
1100                         
1101                         Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a>  on Wed May 02 2012 11:27:35 GMT+0800 (HKT)
1102                         Based on 
1103                         <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>  
1104                 </div>
1105         </body>
1106 </html>