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