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