Upgrade to ExtJS 4.0.2 - Released 06/09/2011
[extjs.git] / docs / source / Transaction.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5   <title>The source code</title>
6   <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
7   <script type="text/javascript" src="../prettify/prettify.js"></script>
8   <style type="text/css">
9     .highlight { display: block; background-color: #ddd; }
10   </style>
11   <script type="text/javascript">
12     function highlight() {
13       document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
14     }
15   </script>
16 </head>
17 <body onload="prettyPrint(); highlight();">
18   <pre class="prettyprint lang-js"><span id='Ext-direct-Transaction'>/**
19 </span> * @class Ext.direct.Transaction
20  * @extends Object
21  * &lt;p&gt;Supporting Class for Ext.Direct (not intended to be used directly).&lt;/p&gt;
22  */
23 Ext.define('Ext.direct.Transaction', {
24     
25     /* Begin Definitions */
26    
27     alias: 'direct.transaction',
28     alternateClassName: 'Ext.Direct.Transaction',
29    
30     statics: {
31         TRANSACTION_ID: 0
32     },
33    
34     /* End Definitions */
35
36 <span id='Ext-direct-Transaction-method-constructor'>    /**
37 </span>     * Creates new Transaction.
38      * @param {Object} config  (optional) Config object.
39      */
40     constructor: function(config){
41         var me = this;
42         
43         Ext.apply(me, config);
44         me.id = ++me.self.TRANSACTION_ID;
45         me.retryCount = 0;
46     },
47    
48     send: function(){
49          this.provider.queueTransaction(this);
50     },
51
52     retry: function(){
53         this.retryCount++;
54         this.send();
55     },
56
57     getProvider: function(){
58         return this.provider;
59     }
60 });
61 </pre>
62 </body>
63 </html>