sync
[roojs1] / docs / symbols / Roo.data.ScriptTagProxy.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.data.ScriptTagProxy</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.data.ScriptTagProxy-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
35         <a class="inner-link" href="#Roo.data.ScriptTagProxy-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
36         <a class="inner-link" href="#Roo.data.ScriptTagProxy-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
37         <a class="inner-link" href="#Roo.data.ScriptTagProxy-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.data.ScriptTagProxy
51                         </h1>
52                         
53     <table cellspacing="0" class="class-summary-table">
54         
55                 <tr><td class="label">Package:</td><td class="hd-info">Roo.data</td></tr>
56         
57         <tr><td class="label">Defined In:</td><td class="hd-info">
58                         
59                                         <a href="./src/Roo_data_ScriptTagProxy.js.html">Roo/data/ScriptTagProxy.js</a>.
60                         
61         </td></tr>
62         <tr><td class="label">Class:</td><td class="hd-info">ScriptTagProxy</td></tr>
63         
64         
65         
66         
67     </table>
68
69     
70 <!-- ============================== class summary ========================== -->                        
71     <div class="description">
72         An implementation of Roo.data.DataProxy that reads a data object from a URL which may be in a domain<br/>other than the originating domain of the running page.<br><br><br/><p><br/><em>Note that if you are retrieving data from a page that is in a domain that is NOT the same as the originating domain<br/>of the running page, you must use this class, rather than DataProxy.</em><br><br><br/><p><br/>The content passed back from a server resource requested by a ScriptTagProxy is executable JavaScript<br/>source code that is used as the source inside a &lt;script> tag.<br><br><br/><p><br/>In order for the browser to process the returned data, the server must wrap the data object<br/>with a call to a callback function, the name of which is passed as a parameter by the ScriptTagProxy.<br/>Below is a Java example for a servlet which returns data for either a ScriptTagProxy, or an HttpProxy<br/>depending on whether the callback name was passed:<br/><p><br/><pre><code><br/>boolean scriptTag = false;<br/>String cb = request.getParameter("callback");<br/>if (cb != null) {<br/>    scriptTag = true;<br/>    response.setContentType("text/javascript");<br/>} else {<br/>    response.setContentType("application/x-json");<br/>}<br/>Writer out = response.getWriter();<br/>if (scriptTag) {<br/>    out.write(cb + "(");<br/>}<br/>out.print(dataBlock.toJsonString());<br/>if (scriptTag) {<br/>    out.write(");");<br/>}<br/></pre></code>
73     </div>
74
75         
76 <!-- ============================== Class comment block... ========================== -->                                       
77
78 <div class="comments">
79         <b>Class Comments / Notes</B> =>  
80         <u onclick="parent.CommentDialog.showCommentId = 'Roo.data.ScriptTagProxy';">[Add Your comment/notes about this class]</u>
81         <br/>
82         <iframe frameborder="0"  id="comments-Roo.data" style="border: none;width:100%;" 
83                 src="/blog.php/GtkDjsComments/Roo.data.ScriptTagProxy.html"></iframe>
84 </div>
85         
86
87                 
88 <!-- ============================== config options ========================== -->                                               
89                  
90     
91     
92                 
93     <div class="hr"></div>
94     <a id="Roo.data.ScriptTagProxy-configs"></a>
95                 
96     
97      
98     
99         
100       <table cellspacing="0" class="member-table">   
101       <caption>Config Options (Usually are also Properties)</caption>
102     
103         
104         <tr>
105             <th class="sig-header" colspan="2">Options</th>
106             
107             <th class="msource-header">Defined By</th>
108         </tr>
109         
110         
111         
112         
113         
114                 <tr class="config-row expandable config-row-alt0 notInherited">
115                    <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
116                     <td class="sig">
117
118                         <a id="Roo.data.ScriptTagProxy-cfg-callbackParam" name=".callbackParam"></a>
119                         <div class="fixedFont">
120                                 <b  class="itemname">callbackParam</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
121                                 
122                                 
123                         </div>
124                   
125                         <div class="mdesc">
126                             <div class="short">(Optional) The name of the parameter to pass to the server which tells<br/>the server the name of the callback function set up by the load call to process the returned data object.</div> 
127                         </div>
128                         
129                         <div class="mdesc">
130                             <div class="long">(Optional) The name of the parameter to pass to the server which tells<br/>the server the name of the callback function set up by the load call to process the returned data object.<br/>Defaults to "callback".<p>The server-side processing must read this parameter value, and generate<br/>javascript output which calls this named function passing the data object as its only parameter.</div> 
131                         </div>
132                         
133                         
134
135                     </td>
136                     <td class="msource">
137                         
138                         Roo.data.ScriptTagProxy
139                                 
140                     </td>
141                 </tr>
142         
143         
144                 <tr class="config-row expandable config-row-alt1 notInherited">
145                    <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
146                     <td class="sig">
147
148                         <a id="Roo.data.ScriptTagProxy-cfg-nocache" name=".nocache"></a>
149                         <div class="fixedFont">
150                                 <b  class="itemname">nocache</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
151                                 
152                                 
153                         </div>
154                   
155                         <div class="mdesc">
156                             <div class="short">(Optional) Defaults to true.</div> 
157                         </div>
158                         
159                         <div class="mdesc">
160                             <div class="long">(Optional) Defaults to true. Disable cacheing by adding a unique parameter<br/>name to the request.</div> 
161                         </div>
162                         
163                         
164
165                     </td>
166                     <td class="msource">
167                         
168                         Roo.data.ScriptTagProxy
169                                 
170                     </td>
171                 </tr>
172         
173         
174                 <tr class="config-row expandable config-row-alt0 notInherited">
175                    <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
176                     <td class="sig">
177
178                         <a id="Roo.data.ScriptTagProxy-cfg-timeout" name=".timeout"></a>
179                         <div class="fixedFont">
180                                 <b  class="itemname">timeout</b> : <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
181                                 
182                                 
183                         </div>
184                   
185                         <div class="mdesc">
186                             <div class="short">(Optional) The number of milliseconds to wait for a response.</div> 
187                         </div>
188                         
189                         <div class="mdesc">
190                             <div class="long">(Optional) The number of milliseconds to wait for a response. Defaults to 30 seconds.</div> 
191                         </div>
192                         
193                         
194
195                     </td>
196                     <td class="msource">
197                         
198                         Roo.data.ScriptTagProxy
199                                 
200                     </td>
201                 </tr>
202         
203         
204                 <tr class="config-row expandable config-row-alt1 notInherited">
205                    <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
206                     <td class="sig">
207
208                         <a id="Roo.data.ScriptTagProxy-cfg-url" name=".url"></a>
209                         <div class="fixedFont">
210                                 <b  class="itemname">url</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
211                                 
212                                 
213                         </div>
214                   
215                         <div class="mdesc">
216                             <div class="short">The URL from which to request the data object.</div> 
217                         </div>
218                         
219                         <div class="mdesc">
220                             <div class="long">The URL from which to request the data object.</div> 
221                         </div>
222                         
223                         
224
225                     </td>
226                     <td class="msource">
227                         
228                         Roo.data.ScriptTagProxy
229                                 
230                     </td>
231                 </tr>
232         
233         
234     </table>
235                 
236   
237   
238   
239   
240   
241   
242   
243   
244   <!-- ============================== public properties ==================== -->        
245   
246   
247   
248     <a id="Roo.data.ScriptTagProxy-props"></a>      
249     
250     
251
252     
253     
254      <table cellspacing="0" class="member-table">
255       <caption class="Empty">Public Properties - Has None</caption>
256      </table>
257     
258     
259      
260     
261   <!-- ============================== methods summary / details ======================== -->
262   
263   
264   <a id="Roo.data.ScriptTagProxy-methods"></a>
265         <!-- constructor?? -->
266         
267         <!-- static's first 
268         
269         
270         -->
271         
272         <!-- then dynamics first -->
273         
274   
275   
276     
277     
278     
279       <table cellspacing="0" class="member-table">
280       <caption>Public Methods</caption>
281         <tr>
282             <th class="sig-header" colspan="2">Method</th>            
283             <th class="msource-header">Defined By</th>
284
285         </tr>
286         
287         
288         
289          
290         
291         
292           
293           <tr class="method-row config-row-alt0 expandable notInherited">
294             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
295            
296            
297             <td class="sig">
298                 <a id="Roo.data-method-ScriptTagProxy"   name=".ScriptTagProxy"></a>
299                 <div class="fixedFont">
300                         <span class="attributes">new <B>Roo.data.</B></span><b class="itemname">ScriptTagProxy</b>
301                                 
302                                  (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>config</i></B>) 
303                         
304                                 
305                         
306                 </div>
307                 <div class="mdesc">
308                 
309                  
310                         <div class="short">Create a new Roo.data.ScriptTagProxy</div> 
311                  
312                  
313                     <div class="long">
314                         
315                         
316                         
317                                 Create a new Roo.data.ScriptTagProxy
318                         
319                         
320                                 <dl class="detailList">
321                                 <dt class="heading">Parameters:</dt>
322                                 
323                                         <dt>
324                                                 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span>  <b>config</b>
325                                                 
326                                         </dt>
327                                         <dd>A configuration object.</dd>
328                                 
329                                 </dl>
330                         
331                         
332                         
333                         
334                         
335                         
336                         
337
338                     
339                     
340                      
341                     </div>                    
342                 </div>
343
344             </td>
345             <td class="msource">
346                 &nbsp;
347             </td>
348         </tr>
349         
350           
351           <tr class="method-row config-row-alt1 expandable notInherited">
352             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
353            
354            
355             <td class="sig">
356                 <a id="Roo.data.ScriptTagProxy-method-abort"   name=".abort"></a>
357                 <div class="fixedFont">
358                         <span class="attributes"></span><b class="itemname">abort</b>
359                                 
360                                  () 
361                         
362                                 
363                         
364                 </div>
365                 <div class="mdesc">
366                 
367                    <div class="short">Abort the current server request.</div> 
368                  
369                  
370                  
371                     <div class="long">
372                         
373                                 Abort the current server request.
374                     
375                                 
376                         
377                         
378                         
379                         
380                         
381                         
382                         
383                         
384                         
385                         
386
387                     
388                     
389                      
390                     </div>                    
391                 </div>
392
393             </td>
394             <td class="msource">
395                 
396                         Roo.data.ScriptTagProxy
397                 &nbsp;
398             </td>
399         </tr>
400         
401           
402           <tr class="method-row config-row-alt0 expandable notInherited">
403             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
404            
405            
406             <td class="sig">
407                 <a id="Roo.data.ScriptTagProxy-method-load"   name=".load"></a>
408                 <div class="fixedFont">
409                         <span class="attributes"></span><b class="itemname">load</b>
410                                 
411                                  (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>params</i></B>, <a href="./Roo.data.DataReader.html#constructor" roo:cls="Roo.data.DataReader.html#constructor">Roo.data.DataReader</a> <B><i>reader</i></B>, <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>callback</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>scope</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>arg</i></B>) 
412                         
413                                 
414                         
415                 </div>
416                 <div class="mdesc">
417                 
418                    <div class="short">Load data from the configured URL, read the data object into<br/>a block of Roo.data.Records using the passed Roo.data.DataReader implementation, and<br/>process that block using the passed callback.</div> 
419                  
420                  
421                  
422                     <div class="long">
423                         
424                                 Load data from the configured URL, read the data object into<br/>a block of Roo.data.Records using the passed Roo.data.DataReader implementation, and<br/>process that block using the passed callback.
425                     
426                                 
427                         
428                         
429                         
430                         
431                                 <dl class="detailList">
432                                 <dt class="heading">Parameters:</dt>
433                                 
434                                         <dt>
435                                                 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span>  <b>params</b>
436                                                 
437                                         </dt>
438                                         <dd>An object containing properties which are to be used as HTTP parameters<br/>for the request to the remote server.</dd>
439                                 
440                                         <dt>
441                                                 <span class="fixedFont"><a href="./Roo.data.DataReader.html#constructor" roo:cls="Roo.data.DataReader.html#constructor">Roo.data.DataReader</a></span>  <b>reader</b>
442                                                 
443                                         </dt>
444                                         <dd>The Reader object which converts the data<br/>object into a block of Roo.data.Records.</dd>
445                                 
446                                         <dt>
447                                                 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span>  <b>callback</b>
448                                                 
449                                         </dt>
450                                         <dd>The function into which to pass the block of Roo.data.Records.<br/>The function must be passed <ul><br/><li>The Record block object</li><br/><li>The "arg" argument from the load function</li><br/><li>A boolean success indicator</li><br/></ul></dd>
451                                 
452                                         <dt>
453                                                 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span>  <b>scope</b>
454                                                 
455                                         </dt>
456                                         <dd>The scope in which to call the callback</dd>
457                                 
458                                         <dt>
459                                                 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span>  <b>arg</b>
460                                                 
461                                         </dt>
462                                         <dd>An optional argument which is passed to the callback as its second parameter.</dd>
463                                 
464                                 </dl>
465                         
466                         
467                         
468                         
469                         
470                         
471                         
472
473                     
474                     
475                      
476                     </div>                    
477                 </div>
478
479             </td>
480             <td class="msource">
481                 
482                         Roo.data.ScriptTagProxy
483                 &nbsp;
484             </td>
485         </tr>
486         
487                                                        
488     </table>
489
490   
491   <!-- ============================== events summary / details ======================== -->
492   
493   
494   <a id="Roo.data.ScriptTagProxy-events"></a>
495     
496   
497         
498    
499     
500      <table cellspacing="0" class="member-table">
501       <caption class="Empty">Events - Has None</caption>
502      </table>
503     
504     
505   
506     
507     
508   
509   
510   
511  
512 <!-- ============================== footer ================================= -->
513                 <div class="fineprint" style="clear:both">
514                         
515                         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)
516                         Based on 
517                         <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>  
518                 </div>
519         </body>
520 </html>