Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / src / direct / RemotingEvent.js
diff --git a/src/direct/RemotingEvent.js b/src/direct/RemotingEvent.js
new file mode 100644 (file)
index 0000000..d8a037d
--- /dev/null
@@ -0,0 +1,25 @@
+/**
+ * @class Ext.direct.RemotingEvent
+ * @extends Ext.direct.Event
+ * An event that is fired when data is received from a 
+ * {@link Ext.direct.RemotingProvider}. Contains a method to the
+ * related transaction for the direct request, see {@link #getTransaction}
+ */
+Ext.define('Ext.direct.RemotingEvent', {
+    
+    /* Begin Definitions */
+   
+    extend: 'Ext.direct.Event',
+    
+    alias: 'direct.rpc',
+    
+    /* End Definitions */
+    
+    /**
+     * Get the transaction associated with this event.
+     * @return {Ext.direct.Transaction} The transaction
+     */
+    getTransaction: function(){
+        return this.transaction || Ext.direct.Manager.getTransaction(this.tid);
+    }
+});