Pman.Request.js
authorAlan Knowles <alan@akbkhome.com>
Mon, 13 Sep 2010 04:47:20 +0000 (12:47 +0800)
committerAlan Knowles <alan@akbkhome.com>
Mon, 13 Sep 2010 04:47:20 +0000 (12:47 +0800)
Pman.Request.js

index 8161fe9..a8dc675 100644 (file)
@@ -1,8 +1,8 @@
 //<script type="text/javascript">
 /**
 * @class Pman.Request
-* Handles generic requests  - an extension of Roo.data.Connection that 
-* shows error messages, and parses results..
+* Handles generic requests  - an extension of Roo.data.Connection that runs the request
+* on construction. shows error messages, and parses results.
 * Usage:
 <pre><code>
 var t = new Pman.Request({
@@ -22,15 +22,16 @@ var t = new Pman.Request({
 * @param {Object} cfg   Configuration object.
 * @cfg {String} url     Location to download from.
 * @cfg {String} method     GET or POST (default GET), POST will create a form, and post that into the hidden frame.
-* @cfg {Boolean} newWindow (optional) download to new window
-     
+* @cfg  {Object/String/Function} (Optional) An object containing properties which are used as parameters to the
+*       request, a url encoded string or a function to call to get either.
+*    
 */
 
 Pman.Request = function(config){
     
     Pman.Request.superclass.constructor.call(this, config);
+    config.failure  = typeof(config.failure) == 'undefined' ? this.failure : config.failure;
     this.request(config);
-
 }
 
 Roo.extend(Pman.Request, Roo.data.Connection, {