fix docs add optvalues
[roojs1] / docs / symbols / Roo.DomTemplate.json
1 {
2   "name" : "Roo.DomTemplate",
3   "augments" : [
4     "Roo.Template"
5   ],
6   "childClasses" : {  },
7   "tree_children" : [],
8   "tree_parent" : [],
9   "desc" : "An effort at a dom based template engine..\n\nSimilar to XTemplate, except it uses dom parsing to create the template..\n\nSupported features:\n\n Tags:\n\n<pre><code>\n      {a_variable} - output encoded.\n      {a_variable.format:(\"Y-m-d\")} - call a method on the variable\n      {a_variable:raw} - unencoded output\n      {a_variable:toFixed(1,2)} - Roo.util.Format.\"toFixed\"\n      {a_variable:this.method_on_template(...)} - call a method on the template object.\n \n</code></pre>\n The tpl tag:\n<pre><code>\n        &lt;div roo-for=\"a_variable or condition..\"&gt;&lt;/div&gt;\n        &lt;div roo-if=\"a_variable or condition\"&gt;&lt;/div&gt;\n        &lt;div roo-exec=\"some javascript\"&gt;&lt;/div&gt;\n        &lt;div roo-name=\"named_template\"&gt;&lt;/div&gt; \n  \n</code></pre>",
10   "isSingleton" : false,
11   "isStatic" : false,
12   "isBuiltin" : false,
13   "isAbstract" : false,
14   "isBuilderTop" : false,
15   "memberOf" : "DomTemplate",
16   "example" : "",
17   "deprecated" : "",
18   "since" : "",
19   "see" : "",
20   "params" : [],
21   "returns" : [],
22   "throws" : "",
23   "requires" : "",
24   "config" : [
25     {
26       "name" : "onLoad",
27       "type" : "Function",
28       "desc" : "Called after the template has been loaded and complied (usually from a remove source)",
29       "memberOf" : "Roo.Template",
30       "isOptional" : false,
31       "optvalues" : []
32     },
33     {
34       "name" : "html",
35       "type" : "String",
36       "desc" : "The HTML fragment or an array of fragments to join(\"\") or multiple arguments to join(\"\")",
37       "memberOf" : "Roo.Template",
38       "isOptional" : false,
39       "optvalues" : []
40     },
41     {
42       "name" : "url",
43       "type" : "String",
44       "desc" : "The Url to load the template from. beware if you are loading from a url, the data may not be ready if you use it instantly..\n                   it should be fixed so that template is observable...",
45       "memberOf" : "Roo.Template",
46       "isOptional" : false,
47       "optvalues" : []
48     }
49   ],
50   "methods" : [
51     {
52       "name" : "applySubTemplate",
53       "type" : "function",
54       "desc" : "same as applyTemplate, except it's done to one of the subTemplates\nwhen using named templates, you can do:\n\nvar str = pl.applySubTemplate('your-name', values);",
55       "sig" : "(id, values, parent)",
56       "static" : false,
57       "memberOf" : "",
58       "isStatic" : false,
59       "isConstructor" : false,
60       "isPrivate" : false,
61       "example" : "",
62       "deprecated" : "",
63       "since" : "",
64       "see" : "",
65       "exceptions" : "",
66       "requires" : "",
67       "params" : [
68         {
69           "name" : "id",
70           "type" : "Number",
71           "desc" : "of the template",
72           "isOptional" : false
73         },
74         {
75           "name" : "values",
76           "type" : "Object",
77           "desc" : "to apply to template",
78           "isOptional" : false
79         },
80         {
81           "name" : "parent",
82           "type" : "Object",
83           "desc" : "(normaly the instance of this object)",
84           "isOptional" : false
85         }
86       ],
87       "returns" : []
88     },
89     {
90       "name" : "compile",
91       "type" : "function",
92       "desc" : "compile the template\n\nThis is not recursive, so I'm not sure how nested templates are really going to be handled..",
93       "sig" : "()\n{\n\n}",
94       "static" : false,
95       "memberOf" : "",
96       "isStatic" : false,
97       "isConstructor" : false,
98       "isPrivate" : false,
99       "example" : "",
100       "deprecated" : "",
101       "since" : "",
102       "see" : "",
103       "exceptions" : "",
104       "requires" : "",
105       "params" : [],
106       "returns" : []
107     },
108     {
109       "name" : "compileTpl",
110       "type" : "function",
111       "desc" : "Compile a segment of the template into a 'sub-template'",
112       "sig" : "()\n{\n\n}",
113       "static" : false,
114       "memberOf" : "",
115       "isStatic" : false,
116       "isConstructor" : false,
117       "isPrivate" : false,
118       "example" : "",
119       "deprecated" : "",
120       "since" : "",
121       "see" : "",
122       "exceptions" : "",
123       "requires" : "",
124       "params" : [],
125       "returns" : []
126     },
127     {
128       "name" : "insertFirst",
129       "type" : "function",
130       "desc" : "Applies the supplied values to the template and inserts the new node(s) as the first child of el.",
131       "sig" : "(el, values, returnElement)",
132       "static" : false,
133       "memberOf" : "Roo.Template",
134       "isStatic" : false,
135       "isConstructor" : false,
136       "isPrivate" : false,
137       "example" : "",
138       "deprecated" : "",
139       "since" : "",
140       "see" : "",
141       "exceptions" : "",
142       "requires" : "",
143       "params" : [
144         {
145           "name" : "el",
146           "type" : "String/HTMLElement/Roo.Element",
147           "desc" : "The context element",
148           "isOptional" : false
149         },
150         {
151           "name" : "values",
152           "type" : "Object",
153           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
154           "isOptional" : false
155         },
156         {
157           "name" : "returnElement",
158           "type" : "Boolean",
159           "desc" : "(optional) true to return a Roo.Element (defaults to undefined)",
160           "isOptional" : false
161         }
162       ],
163       "returns" : [
164         {
165           "name" : "",
166           "type" : "HTMLElement/Roo.Element",
167           "desc" : "The new node or Element"
168         }
169       ]
170     },
171     {
172       "name" : "overwrite",
173       "type" : "function",
174       "desc" : "Applies the supplied values to the template and overwrites the content of el with the new node(s).",
175       "sig" : "(el, values, returnElement)",
176       "static" : false,
177       "memberOf" : "Roo.Template",
178       "isStatic" : false,
179       "isConstructor" : false,
180       "isPrivate" : false,
181       "example" : "",
182       "deprecated" : "",
183       "since" : "",
184       "see" : "",
185       "exceptions" : "",
186       "requires" : "",
187       "params" : [
188         {
189           "name" : "el",
190           "type" : "String/HTMLElement/Roo.Element",
191           "desc" : "The context element",
192           "isOptional" : false
193         },
194         {
195           "name" : "values",
196           "type" : "Object",
197           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
198           "isOptional" : false
199         },
200         {
201           "name" : "returnElement",
202           "type" : "Boolean",
203           "desc" : "(optional) true to return a Roo.Element (defaults to undefined)",
204           "isOptional" : false
205         }
206       ],
207       "returns" : [
208         {
209           "name" : "",
210           "type" : "HTMLElement/Roo.Element",
211           "desc" : "The new node or Element"
212         }
213       ]
214     },
215     {
216       "name" : "insertBefore",
217       "type" : "function",
218       "desc" : "Applies the supplied values to the template and inserts the new node(s) before el.",
219       "sig" : "(el, values, returnElement)",
220       "static" : false,
221       "memberOf" : "Roo.Template",
222       "isStatic" : false,
223       "isConstructor" : false,
224       "isPrivate" : false,
225       "example" : "",
226       "deprecated" : "",
227       "since" : "",
228       "see" : "",
229       "exceptions" : "",
230       "requires" : "",
231       "params" : [
232         {
233           "name" : "el",
234           "type" : "String/HTMLElement/Roo.Element",
235           "desc" : "The context element",
236           "isOptional" : false
237         },
238         {
239           "name" : "values",
240           "type" : "Object",
241           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
242           "isOptional" : false
243         },
244         {
245           "name" : "returnElement",
246           "type" : "Boolean",
247           "desc" : "(optional) true to return a Roo.Element (defaults to undefined)",
248           "isOptional" : false
249         }
250       ],
251       "returns" : [
252         {
253           "name" : "",
254           "type" : "HTMLElement/Roo.Element",
255           "desc" : "The new node or Element"
256         }
257       ]
258     },
259     {
260       "name" : "applyTemplate",
261       "type" : "function",
262       "desc" : "Returns an HTML fragment of this template with the specified values applied.",
263       "sig" : "(values)",
264       "static" : false,
265       "memberOf" : "Roo.Template",
266       "isStatic" : false,
267       "isConstructor" : false,
268       "isPrivate" : false,
269       "example" : "",
270       "deprecated" : "",
271       "since" : "",
272       "see" : "",
273       "exceptions" : "",
274       "requires" : "",
275       "params" : [
276         {
277           "name" : "values",
278           "type" : "Object",
279           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
280           "isOptional" : false
281         }
282       ],
283       "returns" : [
284         {
285           "name" : "",
286           "type" : "String",
287           "desc" : "The HTML fragment"
288         }
289       ]
290     },
291     {
292       "name" : "set",
293       "type" : "function",
294       "desc" : "Sets the HTML used as the template and optionally compiles it.",
295       "sig" : "(html, compile)",
296       "static" : false,
297       "memberOf" : "Roo.Template",
298       "isStatic" : false,
299       "isConstructor" : false,
300       "isPrivate" : false,
301       "example" : "",
302       "deprecated" : "",
303       "since" : "",
304       "see" : "",
305       "exceptions" : "",
306       "requires" : "",
307       "params" : [
308         {
309           "name" : "html",
310           "type" : "String",
311           "desc" : "",
312           "isOptional" : false
313         },
314         {
315           "name" : "compile",
316           "type" : "Boolean",
317           "desc" : "(optional) True to compile the template (defaults to undefined)",
318           "isOptional" : false
319         }
320       ],
321       "returns" : [
322         {
323           "name" : "",
324           "type" : "Roo.Template",
325           "desc" : "this"
326         }
327       ]
328     },
329     {
330       "name" : "from",
331       "type" : "function",
332       "desc" : "Creates a template from the passed element's value (<i>display:none</i> textarea, preferred) or innerHTML.",
333       "sig" : "(el)",
334       "static" : true,
335       "memberOf" : "Roo.Template",
336       "isStatic" : true,
337       "isConstructor" : false,
338       "isPrivate" : false,
339       "example" : "",
340       "deprecated" : "",
341       "since" : "",
342       "see" : "",
343       "exceptions" : "",
344       "requires" : "",
345       "params" : [
346         {
347           "name" : "el",
348           "type" : "String/HTMLElement",
349           "desc" : "A DOM element or its id",
350           "isOptional" : false
351         }
352       ],
353       "returns" : []
354     },
355     {
356       "name" : "insertAfter",
357       "type" : "function",
358       "desc" : "Applies the supplied values to the template and inserts the new node(s) after el.",
359       "sig" : "(el, values, returnElement)",
360       "static" : false,
361       "memberOf" : "Roo.Template",
362       "isStatic" : false,
363       "isConstructor" : false,
364       "isPrivate" : false,
365       "example" : "",
366       "deprecated" : "",
367       "since" : "",
368       "see" : "",
369       "exceptions" : "",
370       "requires" : "",
371       "params" : [
372         {
373           "name" : "el",
374           "type" : "String/HTMLElement/Roo.Element",
375           "desc" : "The context element",
376           "isOptional" : false
377         },
378         {
379           "name" : "values",
380           "type" : "Object",
381           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
382           "isOptional" : false
383         },
384         {
385           "name" : "returnElement",
386           "type" : "Boolean",
387           "desc" : "(optional) true to return a Roo.Element (defaults to undefined)",
388           "isOptional" : false
389         }
390       ],
391       "returns" : [
392         {
393           "name" : "",
394           "type" : "HTMLElement/Roo.Element",
395           "desc" : "The new node or Element"
396         }
397       ]
398     },
399     {
400       "name" : "append",
401       "type" : "function",
402       "desc" : "Applies the supplied values to the template and appends the new node(s) to el.",
403       "sig" : "(el, values, returnElement)",
404       "static" : false,
405       "memberOf" : "Roo.Template",
406       "isStatic" : false,
407       "isConstructor" : false,
408       "isPrivate" : false,
409       "example" : "",
410       "deprecated" : "",
411       "since" : "",
412       "see" : "",
413       "exceptions" : "",
414       "requires" : "",
415       "params" : [
416         {
417           "name" : "el",
418           "type" : "String/HTMLElement/Roo.Element",
419           "desc" : "The context element",
420           "isOptional" : false
421         },
422         {
423           "name" : "values",
424           "type" : "Object",
425           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
426           "isOptional" : false
427         },
428         {
429           "name" : "returnElement",
430           "type" : "Boolean",
431           "desc" : "(optional) true to return a Roo.Element (defaults to undefined)",
432           "isOptional" : false
433         }
434       ],
435       "returns" : [
436         {
437           "name" : "",
438           "type" : "HTMLElement/Roo.Element",
439           "desc" : "The new node or Element"
440         }
441       ]
442     },
443     {
444       "name" : "apply",
445       "type" : "function",
446       "desc" : "Alias for {@link #applyTemplate}",
447       "sig" : "()\n{\n\n}",
448       "static" : false,
449       "memberOf" : "Roo.Template",
450       "isStatic" : false,
451       "isConstructor" : false,
452       "isPrivate" : false,
453       "example" : "",
454       "deprecated" : "",
455       "since" : "",
456       "see" : "",
457       "exceptions" : "",
458       "requires" : "",
459       "params" : [],
460       "returns" : []
461     }
462   ],
463   "events" : []
464 }