Upgrade to ExtJS 4.0.7 - Released 10/19/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="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
7   <script type="text/javascript" src="../resources/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> * Supporting Class for Ext.Direct (not intended to be used directly).
20  */
21 Ext.define('Ext.direct.Transaction', {
22     
23     /* Begin Definitions */
24    
25     alias: 'direct.transaction',
26     alternateClassName: 'Ext.Direct.Transaction',
27    
28     statics: {
29         TRANSACTION_ID: 0
30     },
31    
32     /* End Definitions */
33
34 <span id='Ext-direct-Transaction-method-constructor'>    /**
35 </span>     * Creates new Transaction.
36      * @param {Object} [config] Config object.
37      */
38     constructor: function(config){
39         var me = this;
40         
41         Ext.apply(me, config);
42         me.id = ++me.self.TRANSACTION_ID;
43         me.retryCount = 0;
44     },
45    
46     send: function(){
47          this.provider.queueTransaction(this);
48     },
49
50     retry: function(){
51         this.retryCount++;
52         this.send();
53     },
54
55     getProvider: function(){
56         return this.provider;
57     }
58 });
59 </pre>
60 </body>
61 </html>