initial import
[roojs1] / Roo / data / DataProxy.js
1 /*
2  * Based on:
3  * Ext JS Library 1.1.1
4  * Copyright(c) 2006-2007, Ext JS, LLC.
5  *
6  * Originally Released Under LGPL - original licence link has changed is not relivant.
7  *
8  * Fork - LGPL
9  * <script type="text/javascript">
10  */
11
12 /**
13  * @class Roo.data.DataProxy
14  * @extends Roo.data.Observable
15  * This class is an abstract base class for implementations which provide retrieval of
16  * unformatted data objects.<br>
17  * <p>
18  * DataProxy implementations are usually used in conjunction with an implementation of Roo.data.DataReader
19  * (of the appropriate type which knows how to parse the data object) to provide a block of
20  * {@link Roo.data.Records} to an {@link Roo.data.Store}.<br>
21  * <p>
22  * Custom implementations must implement the load method as described in
23  * {@link Roo.data.HttpProxy#load}.
24  */
25 Roo.data.DataProxy = function(){
26     this.addEvents({
27         /**
28          * @event beforeload
29          * Fires before a network request is made to retrieve a data object.
30          * @param {Object} This DataProxy object.
31          * @param {Object} params The params parameter to the load function.
32          */
33         beforeload : true,
34         /**
35          * @event load
36          * Fires before the load method's callback is called.
37          * @param {Object} This DataProxy object.
38          * @param {Object} o The data object.
39          * @param {Object} arg The callback argument object passed to the load function.
40          */
41         load : true,
42         /**
43          * @event loadexception
44          * Fires if an Exception occurs during data retrieval.
45          * @param {Object} This DataProxy object.
46          * @param {Object} o The data object.
47          * @param {Object} arg The callback argument object passed to the load function.
48          * @param {Object} e The Exception.
49          */
50         loadexception : true
51     });
52     Roo.data.DataProxy.superclass.constructor.call(this);
53 };
54
55 Roo.extend(Roo.data.DataProxy, Roo.util.Observable);
56
57     /**
58      * @cfg {void} listeners (Not available) Constructor blocks listeners from being set
59      */