1 <div class="body-wrap">
2 <div class="top-tools">
3 <a class="inner-link" href="#Ext.sql.Proxy-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
4 <a class="inner-link" href="#Ext.sql.Proxy-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
5 <a class="inner-link" href="#Ext.sql.Proxy-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
6 <a class="inner-link" href="#Ext.sql.Proxy-configs"><img src="../resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>
7 <a class="bookmark" href="../docs/?class=Ext.sql.Proxy"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
9 <div class="inheritance res-block">
10 <pre class="res-block-inner"><a ext:cls="Ext.util.Observable" ext:member="" href="output/Ext.util.Observable.html">Observable</a>
11 <img src="resources/elbow-end.gif"/><a ext:cls="Ext.data.DataProxy" ext:member="" href="output/Ext.data.DataProxy.html">DataProxy</a>
12 <img src="resources/elbow-end.gif"/>Proxy</pre></div>
13 <h1>Class Ext.sql.Proxy</h1>
14 <table cellspacing="0">
15 <tr><td class="label">Package:</td><td class="hd-info">Ext.sql</td></tr>
16 <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/Proxy.js" target="_blank">Proxy.js</a></td></tr>
17 <tr><td class="label">Class:</td><td class="hd-info">Proxy</td></tr>
18 <tr><td class="label">Extends:</td><td class="hd-info"><a ext:cls="Ext.data.DataProxy" ext:member="" href="output/Ext.data.DataProxy.html">DataProxy</a></td></tr>
20 <div class="description">
22 An implementation of <a ext:cls="Ext.data.DataProxy" href="output/Ext.data.DataProxy.html">Ext.data.DataProxy</a> that reads from a SQLLite
25 <div class="hr"></div>
26 <a id="Ext.sql.Proxy-configs"></a>
27 <h2>Config Options</h2>
28 <table cellspacing="0" class="member-table">
30 <th class="sig-header" colspan="2">Config Options</th>
31 <th class="msource-header">Defined By</th>
33 <tr class="config-row inherited expandable">
\r
34 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
36 <a id="Ext.sql.Proxy-listeners"></a>
\r
37 <b>listeners</b> : Object <div class="mdesc">
\r
38 <div class="short">(optional) A config object containing one or more event handlers to be added to this object during initialization. Th...</div>
\r
40 (optional) A config object containing one or more event handlers to be added to this object during initialization. This should be a valid listeners config object as specified in the <a ext:cls="Ext.util.Observable" ext:member="addListener" href="output/Ext.util.Observable.html#addListener">addListener</a> example for attaching multiple handlers at once. </div>
\r
43 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#listeners" href="output/Ext.util.Observable.html#listeners">Observable</a></td>
\r
46 <a id="Ext.sql.Proxy-props"></a>
47 <h2>Public Properties</h2>
48 <div class="no-members">This class has no public properties.</div> <a id="Ext.sql.Proxy-methods"></a>
49 <h2>Public Methods</h2>
50 <table cellspacing="0" class="member-table">
52 <th class="sig-header" colspan="2">Method</th>
53 <th class="msource-header">Defined By</th>
55 <tr class="method-row expandable">
\r
56 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
58 <a id="Ext.sql.Proxy-Proxy"></a>
\r
59 <b>Proxy</b>( <code>Object conn</code>, <code>String table</code>, <code>String keyName</code>, <code>Ext.data.Store store</code>, <code>Boolean readonly</code> ) <div class="mdesc">
\r
60 <div class="short"></div>
\r
62 <div class="mdetail-params">
\r
63 <strong>Parameters:</strong>
\r
64 <ul><li><code>conn</code> : Object<div class="sub-desc">an <a ext:cls="Ext.sql.Connection" href="output/Ext.sql.Connection.html">Ext.sql.Connection</a> object</div></li><li><code>table</code> : String<div class="sub-desc">The name of the database table</div></li><li><code>keyName</code> : String<div class="sub-desc">The primary key of the table</div></li><li><code>store</code> : Ext.data.Store<div class="sub-desc">The datastore to bind to</div></li><li><code>readonly</code> : Boolean<div class="sub-desc">By default all changes to the store will be persisted
65 to the database. Set this to true to override to make the store readonly.</div></li> </ul>
\r
66 <strong>Returns:</strong>
\r
68 <li><code></code></li>
\r
74 <td class="msource">Proxy</td>
\r
76 <tr class="method-row inherited alt expandable">
\r
77 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
79 <a id="Ext.sql.Proxy-addEvents"></a>
\r
80 <b>addEvents</b>( <code>Object object</code> ) : void <div class="mdesc">
\r
81 <div class="short">Used to define events on this Observable</div>
\r
83 Used to define events on this Observable <div class="mdetail-params">
\r
84 <strong>Parameters:</strong>
\r
85 <ul><li><code>object</code> : Object<div class="sub-desc">The object with the events defined</div></li> </ul>
\r
86 <strong>Returns:</strong>
\r
88 <li><code>void</code></li>
\r
94 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addEvents" href="output/Ext.util.Observable.html#addEvents">Observable</a></td>
\r
96 <tr class="method-row inherited expandable">
\r
97 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
99 <a id="Ext.sql.Proxy-addListener"></a>
\r
100 <b>addListener</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span> ) : void <div class="mdesc">
\r
101 <div class="short">Appends an event handler to this component</div>
\r
103 Appends an event handler to this component <div class="mdetail-params">
\r
104 <strong>Parameters:</strong>
\r
105 <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the handler
106 function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing handler configuration
107 properties. This may contain any of the following properties:<ul>
108 <li><b>scope</b> : Object<p class="sub-desc">The scope in which to execute the handler function. The handler function's "this" context.</p></li>
109 <li><b>delay</b> : Number<p class="sub-desc">The number of milliseconds to delay the invocation of the handler after the event fires.</p></li>
110 <li><b>single</b> : Boolean<p class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</p></li>
111 <li><b>buffer</b> : Number<p class="sub-desc">Causes the handler to be scheduled to run in an <a ext:cls="Ext.util.DelayedTask" href="output/Ext.util.DelayedTask.html">Ext.util.DelayedTask</a> delayed
112 by the specified number of milliseconds. If the event fires again within that time, the original
113 handler is <em>not</em> invoked, but the new handler is scheduled in its place.</p></li>
116 <b>Combining Options</b><br>
117 Using the options argument, it is possible to combine different types of listeners:<br>
119 A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)
120 <pre><code>el.on(<em>'click'</em>, <b>this</b>.onClick, <b>this</b>, {
126 <b>Attaching multiple handlers in 1 call</b><br>
127 The method also allows for a single argument to be passed which is a config object containing properties
128 which specify multiple handlers.
132 fn: <b>this</b>.onClick,
136 <em>'mouseover'</em> : {
137 fn: <b>this</b>.onMouseOver,
140 <em>'mouseout'</em> : {
141 fn: <b>this</b>.onMouseOut,
146 Or a shorthand syntax:<br>
148 <em>'click'</em> : <b>this</b>.onClick,
149 <em>'mouseover'</em> : <b>this</b>.onMouseOver,
150 <em>'mouseout'</em> : <b>this</b>.onMouseOut,
152 });</code></pre></div></li> </ul>
\r
153 <strong>Returns:</strong>
\r
155 <li><code>void</code></li>
\r
161 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addListener" href="output/Ext.util.Observable.html#addListener">Observable</a></td>
\r
163 <tr class="method-row inherited alt expandable">
\r
164 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
166 <a id="Ext.sql.Proxy-fireEvent"></a>
\r
167 <b>fireEvent</b>( <code>String eventName</code>, <code>Object... args</code> ) : Boolean <div class="mdesc">
\r
168 <div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
\r
170 Fires the specified event with the passed parameters (minus the event name). <div class="mdetail-params">
\r
171 <strong>Parameters:</strong>
\r
172 <ul><li><code>eventName</code> : String<div class="sub-desc"></div></li><li><code>args</code> : Object...<div class="sub-desc">Variable number of parameters are passed to handlers</div></li> </ul>
\r
173 <strong>Returns:</strong>
\r
175 <li><code>Boolean</code><div class="sub-desc">returns false if any of the handlers return false otherwise it returns true</div></li>
\r
181 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#fireEvent" href="output/Ext.util.Observable.html#fireEvent">Observable</a></td>
\r
183 <tr class="method-row inherited expandable">
\r
184 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
186 <a id="Ext.sql.Proxy-hasListener"></a>
\r
187 <b>hasListener</b>( <code>String eventName</code> ) : Boolean <div class="mdesc">
\r
188 <div class="short">Checks to see if this object has any listeners for a specified event</div>
\r
190 Checks to see if this object has any listeners for a specified event <div class="mdetail-params">
\r
191 <strong>Parameters:</strong>
\r
192 <ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to check for</div></li> </ul>
\r
193 <strong>Returns:</strong>
\r
195 <li><code>Boolean</code><div class="sub-desc">True if the event is being listened for, else false</div></li>
\r
201 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#hasListener" href="output/Ext.util.Observable.html#hasListener">Observable</a></td>
\r
203 <tr class="method-row inherited alt expandable">
\r
204 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
206 <a id="Ext.sql.Proxy-on"></a>
\r
207 <b>on</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span> ) : void <div class="mdesc">
\r
208 <div class="short">Appends an event handler to this element (shorthand for addListener)</div>
\r
210 Appends an event handler to this element (shorthand for addListener) <div class="mdetail-params">
\r
211 <strong>Parameters:</strong>
\r
212 <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the handler
213 function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional)</div></li> </ul>
\r
214 <strong>Returns:</strong>
\r
216 <li><code>void</code></li>
\r
222 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#on" href="output/Ext.util.Observable.html#on">Observable</a></td>
\r
224 <tr class="method-row inherited expandable">
\r
225 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
227 <a id="Ext.sql.Proxy-purgeListeners"></a>
\r
228 <b>purgeListeners</b>() : void <div class="mdesc">
\r
229 <div class="short">Removes all listeners for this object</div>
\r
231 Removes all listeners for this object <div class="mdetail-params">
\r
232 <strong>Parameters:</strong>
\r
233 <ul><li>None.</li> </ul>
\r
234 <strong>Returns:</strong>
\r
236 <li><code>void</code></li>
\r
242 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#purgeListeners" href="output/Ext.util.Observable.html#purgeListeners">Observable</a></td>
\r
244 <tr class="method-row inherited alt expandable">
\r
245 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
247 <a id="Ext.sql.Proxy-relayEvents"></a>
\r
248 <b>relayEvents</b>( <code>Object o</code>, <code>Array events</code> ) : void <div class="mdesc">
\r
249 <div class="short">Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>.</div>
\r
251 Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>. <div class="mdetail-params">
\r
252 <strong>Parameters:</strong>
\r
253 <ul><li><code>o</code> : Object<div class="sub-desc">The Observable whose events this object is to relay.</div></li><li><code>events</code> : Array<div class="sub-desc">Array of event names to relay.</div></li> </ul>
\r
254 <strong>Returns:</strong>
\r
256 <li><code>void</code></li>
\r
262 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#relayEvents" href="output/Ext.util.Observable.html#relayEvents">Observable</a></td>
\r
264 <tr class="method-row inherited expandable">
\r
265 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
267 <a id="Ext.sql.Proxy-removeListener"></a>
\r
268 <b>removeListener</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : void <div class="mdesc">
\r
269 <div class="short">Removes a listener</div>
\r
271 Removes a listener <div class="mdetail-params">
\r
272 <strong>Parameters:</strong>
\r
273 <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li> </ul>
\r
274 <strong>Returns:</strong>
\r
276 <li><code>void</code></li>
\r
282 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#removeListener" href="output/Ext.util.Observable.html#removeListener">Observable</a></td>
\r
284 <tr class="method-row inherited alt expandable">
\r
285 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
287 <a id="Ext.sql.Proxy-resumeEvents"></a>
\r
288 <b>resumeEvents</b>() : void <div class="mdesc">
\r
289 <div class="short">Resume firing events. (see <a ext:cls="Ext.util.Observable" ext:member="suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">suspendEvents</a>)</div>
\r
291 Resume firing events. (see <a ext:cls="Ext.util.Observable" ext:member="suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">suspendEvents</a>) <div class="mdetail-params">
\r
292 <strong>Parameters:</strong>
\r
293 <ul><li>None.</li> </ul>
\r
294 <strong>Returns:</strong>
\r
296 <li><code>void</code></li>
\r
302 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">Observable</a></td>
\r
304 <tr class="method-row inherited expandable">
\r
305 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
307 <a id="Ext.sql.Proxy-suspendEvents"></a>
\r
308 <b>suspendEvents</b>() : void <div class="mdesc">
\r
309 <div class="short">Suspend the firing of all events. (see <a ext:cls="Ext.util.Observable" ext:member="resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">resumeEvents</a>)</div>
\r
311 Suspend the firing of all events. (see <a ext:cls="Ext.util.Observable" ext:member="resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">resumeEvents</a>) <div class="mdetail-params">
\r
312 <strong>Parameters:</strong>
\r
313 <ul><li>None.</li> </ul>
\r
314 <strong>Returns:</strong>
\r
316 <li><code>void</code></li>
\r
322 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">Observable</a></td>
\r
324 <tr class="method-row inherited alt expandable">
\r
325 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
327 <a id="Ext.sql.Proxy-un"></a>
\r
328 <b>un</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : void <div class="mdesc">
\r
329 <div class="short">Removes a listener (shorthand for removeListener)</div>
\r
331 Removes a listener (shorthand for removeListener) <div class="mdetail-params">
\r
332 <strong>Parameters:</strong>
\r
333 <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li> </ul>
\r
334 <strong>Returns:</strong>
\r
336 <li><code>void</code></li>
\r
342 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#un" href="output/Ext.util.Observable.html#un">Observable</a></td>
\r
345 <a id="Ext.sql.Proxy-events"></a>
346 <h2>Public Events</h2>
347 <table cellspacing="0" class="member-table">
349 <th class="sig-header" colspan="2">Event</th>
350 <th class="msource-header">Defined By</th>
352 <tr class="event-row inherited expandable">
\r
353 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
355 <a id="Ext.sql.Proxy-beforeload"></a>
\r
356 <b>beforeload</b> : ( <code>Object this</code>, <code>Object params</code> ) <div class="mdesc">
\r
357 <div class="short">Fires before a network request is made to retrieve a data object.</div>
\r
359 Fires before a network request is made to retrieve a data object. <div class="mdetail-params">
\r
360 <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
\r
361 <ul><li><code>this</code> : Object<div class="sub-desc"></div></li><li><code>params</code> : Object<div class="sub-desc">The params object passed to the <a ext:cls="Ext.data.DataProxy" ext:member="load" href="output/Ext.data.DataProxy.html#load">load</a> function</div></li> </ul>
\r
366 <td class="msource"><a ext:cls="Ext.data.DataProxy" ext:member="#event-beforeload" href="output/Ext.data.DataProxy.html#event-beforeload">DataProxy</a></td>
\r
368 <tr class="event-row inherited alt expandable">
\r
369 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
371 <a id="Ext.sql.Proxy-load"></a>
\r
372 <b>load</b> : ( <code>Object this</code>, <code>Object o</code>, <code>Object arg</code> ) <div class="mdesc">
\r
373 <div class="short">Fires before the load method's callback is called.</div>
\r
375 Fires before the load method's callback is called. <div class="mdetail-params">
\r
376 <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
\r
377 <ul><li><code>this</code> : Object<div class="sub-desc"></div></li><li><code>o</code> : Object<div class="sub-desc">The data object</div></li><li><code>arg</code> : Object<div class="sub-desc">The callback's arg object passed to the <a ext:cls="Ext.data.DataProxy" ext:member="load" href="output/Ext.data.DataProxy.html#load">load</a> function</div></li> </ul>
\r
382 <td class="msource"><a ext:cls="Ext.data.DataProxy" ext:member="#event-load" href="output/Ext.data.DataProxy.html#event-load">DataProxy</a></td>
\r