Upgrade to ExtJS 4.0.2 - Released 06/09/2011
[extjs.git] / src / direct / RemotingEvent.js
1 /*
2
3 This file is part of Ext JS 4
4
5 Copyright (c) 2011 Sencha Inc
6
7 Contact:  http://www.sencha.com/contact
8
9 GNU General Public License Usage
10 This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file.  Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
11
12 If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
13
14 */
15 /**
16  * @class Ext.direct.RemotingEvent
17  * @extends Ext.direct.Event
18  * An event that is fired when data is received from a 
19  * {@link Ext.direct.RemotingProvider}. Contains a method to the
20  * related transaction for the direct request, see {@link #getTransaction}
21  */
22 Ext.define('Ext.direct.RemotingEvent', {
23     
24     /* Begin Definitions */
25    
26     extend: 'Ext.direct.Event',
27     
28     alias: 'direct.rpc',
29     
30     /* End Definitions */
31     
32     /**
33      * Get the transaction associated with this event.
34      * @return {Ext.direct.Transaction} The transaction
35      */
36     getTransaction: function(){
37         return this.transaction || Ext.direct.Manager.getTransaction(this.tid);
38     }
39 });
40