Merge branch 'master' of http://git.roojs.com/roojs1
[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.util.Observable
15  * @abstract
16  * This class is an abstract base class for implementations which provide retrieval of
17  * unformatted data objects.<br>
18  * <p>
19  * DataProxy implementations are usually used in conjunction with an implementation of Roo.data.DataReader
20  * (of the appropriate type which knows how to parse the data object) to provide a block of
21  * {@link Roo.data.Records} to an {@link Roo.data.Store}.<br>
22  * <p>
23  * Custom implementations must implement the load method as described in
24  * {@link Roo.data.HttpProxy#load}.
25  */
26 Roo.data.DataProxy = function(){
27     this.addEvents({
28         /**
29          * @event beforeload
30          * Fires before a network request is made to retrieve a data object.
31          * @param {Object} This DataProxy object.
32          * @param {Object} params The params parameter to the load function.
33          */
34         beforeload : true,
35         /**
36          * @event load
37          * Fires before the load method's callback is called.
38          * @param {Object} This DataProxy object.
39          * @param {Object} o The data object.
40          * @param {Object} arg The callback argument object passed to the load function.
41          */
42         load : true,
43         /**
44          * @event loadexception
45          * Fires if an Exception occurs during data retrieval.
46          * @param {Object} This DataProxy object.
47          * @param {Object} o The data object.
48          * @param {Object} arg The callback argument object passed to the load function.
49          * @param {Object} e The Exception.
50          */
51         loadexception : true
52     });
53     Roo.data.DataProxy.superclass.constructor.call(this);
54 };
55
56 Roo.extend(Roo.data.DataProxy, Roo.util.Observable);
57
58     /**
59      * @cfg {void} listeners (Not available) Constructor blocks listeners from being set
60      */