1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7 <meta http-equiv="content-type" content="text/html; charset=undefined" />
8 <meta name="generator" content="JsDoc Toolkit" />
11 <title>JsDoc Reference - Roo.data.ScriptTagProxy</title>
14 <link rel="stylesheet" type="text/css" href="../../css/roojs.css" />
15 <link rel="stylesheet" type="text/css" href="../default.css" />
18 <script type="text/javascript" src="../page.js">
25 <body onload="RooDocsPage.onload();">
28 <div class="body-wrap">
30 <!-- ============================== links to methods. ================================= -->
32 <div class="top-tools">
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>
43 <!-- ============================== inheritance Block. ================================= -->
45 <!-- ============================== class title / details ============================ -->
48 <h1 class="classTitle">
50 Class Roo.data.ScriptTagProxy
53 <table cellspacing="0" class="class-summary-table">
55 <tr><td class="label">Package:</td><td class="hd-info">Roo.data</td></tr>
57 <tr><td class="label">Defined In:</td><td class="hd-info">
59 <a href="./src/Roo_data_ScriptTagProxy.js.html">Roo/data/ScriptTagProxy.js</a>.
62 <tr><td class="label">Class:</td><td class="hd-info">ScriptTagProxy</td></tr>
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 <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>
76 <!-- ============================== Class comment block... ========================== -->
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>
82 <iframe frameborder="0" id="comments-Roo.data" style="border: none;width:100%;"
83 src="/blog.php/GtkDjsComments/Roo.data.ScriptTagProxy.html"></iframe>
88 <!-- ============================== config options ========================== -->
93 <div class="hr"></div>
94 <a id="Roo.data.ScriptTagProxy-configs"></a>
100 <table cellspacing="0" class="member-table">
101 <caption>Config Options (Usually are also Properties)</caption>
105 <th class="sig-header" colspan="2">Options</th>
107 <th class="msource-header">Defined By</th>
114 <tr class="config-row expandable config-row-alt0 notInherited">
115 <td class="micon"><a class="exi" href="#expand"> </a></td>
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>
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>
131 (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.
141 Roo.data.ScriptTagProxy
147 <tr class="config-row expandable config-row-alt1 notInherited">
148 <td class="micon"><a class="exi" href="#expand"> </a></td>
151 <a id="Roo.data.ScriptTagProxy-cfg-nocache" name=".nocache"></a>
152 <div class="fixedFont">
153 <b class="itemname">nocache</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
159 <div class="short">(Optional) Defaults to true.</div>
164 (Optional) Defaults to true. Disable cacheing by adding a unique parameter<br/>name to the request.
174 Roo.data.ScriptTagProxy
180 <tr class="config-row expandable config-row-alt0 notInherited">
181 <td class="micon"><a class="exi" href="#expand"> </a></td>
184 <a id="Roo.data.ScriptTagProxy-cfg-timeout" name=".timeout"></a>
185 <div class="fixedFont">
186 <b class="itemname">timeout</b> : <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
192 <div class="short">(Optional) The number of milliseconds to wait for a response.</div>
197 (Optional) The number of milliseconds to wait for a response. Defaults to 30 seconds.
207 Roo.data.ScriptTagProxy
213 <tr class="config-row expandable config-row-alt1 notInherited">
214 <td class="micon"><a class="exi" href="#expand"> </a></td>
217 <a id="Roo.data.ScriptTagProxy-cfg-url" name=".url"></a>
218 <div class="fixedFont">
219 <b class="itemname">url</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
225 <div class="short">The URL from which to request the data object.</div>
230 The URL from which to request the data object.
240 Roo.data.ScriptTagProxy
256 <!-- ============================== public properties ==================== -->
260 <a id="Roo.data.ScriptTagProxy-props"></a>
266 <table cellspacing="0" class="member-table">
267 <caption class="Empty">Public Properties - Has None</caption>
273 <!-- ============================== methods summary / details ======================== -->
276 <a id="Roo.data.ScriptTagProxy-methods"></a>
277 <!-- constructor?? -->
284 <!-- then dynamics first -->
291 <table cellspacing="0" class="member-table">
292 <caption>Public Methods</caption>
294 <th class="sig-header" colspan="2">Method</th>
295 <th class="msource-header">Defined By</th>
305 <tr class="method-row config-row-alt0 expandable notInherited">
306 <td class="micon"><a class="exi" href="#expand"> </a></td>
310 <a id="Roo.data-method-ScriptTagProxy" name=".ScriptTagProxy"></a>
311 <div class="fixedFont">
312 <span class="attributes">new <B>Roo.data.</B></span><b class="itemname">ScriptTagProxy</b>
314 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>config</i></B>)
322 <div class="short">Create a new Roo.data.ScriptTagProxy</div>
329 Create a new Roo.data.ScriptTagProxy
332 <dl class="detailList">
333 <dt class="heading">Parameters:</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>config</b>
339 <dd>A configuration object.</dd>
363 <tr class="method-row config-row-alt1 expandable notInherited">
364 <td class="micon"><a class="exi" href="#expand"> </a></td>
368 <a id="Roo.data.ScriptTagProxy-method-abort" name=".abort"></a>
369 <div class="fixedFont">
370 <span class="attributes"></span><b class="itemname">abort</b>
379 <div class="short">Abort the current server request.</div>
385 Abort the current server request.
408 Roo.data.ScriptTagProxy
414 <tr class="method-row config-row-alt0 expandable notInherited">
415 <td class="micon"><a class="exi" href="#expand"> </a></td>
419 <a id="Roo.data.ScriptTagProxy-method-load" name=".load"></a>
420 <div class="fixedFont">
421 <span class="attributes"></span><b class="itemname">load</b>
423 (<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>)
430 <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>
436 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.
443 <dl class="detailList">
444 <dt class="heading">Parameters:</dt>
447 <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>
450 <dd>An object containing properties which are to be used as HTTP parameters<br/>for the request to the remote server.</dd>
453 <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>
456 <dd>The Reader object which converts the data<br/>object into a block of Roo.data.Records.</dd>
459 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>callback</b>
462 <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>
465 <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>
468 <dd>The scope in which to call the callback</dd>
471 <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>
474 <dd>An optional argument which is passed to the callback as its second parameter.</dd>
494 Roo.data.ScriptTagProxy
503 <!-- ============================== events summary / details ======================== -->
506 <a id="Roo.data.ScriptTagProxy-events"></a>
512 <table cellspacing="0" class="member-table">
513 <caption class="Empty">Events - Has None</caption>
524 <!-- ============================== footer ================================= -->
525 <div class="fineprint" style="clear:both">
527 Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Fri Jul 13 2018 14:10:54 GMT+0800 (HKT)
529 <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>