-<html>\r
-<head>\r
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> \r
- <title>The source code</title>\r
- <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
- <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
-</head>\r
-<body onload="prettyPrint();">\r
- <pre class="prettyprint lang-js">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>The source code</title>
+ <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+ <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
+</head>
+<body onload="prettyPrint();">
+ <pre class="prettyprint lang-js">/*!
+ * Ext JS Library 3.2.0
+ * Copyright(c) 2006-2010 Ext JS, Inc.
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
<div id="cls-Ext.data.Api"></div>/**
* @class Ext.data.Api
* @extends Object
<div id="method-Ext.data.Api-isAction"></div>/**
* Returns true if supplied action-name is a valid API action defined in <code>{@link #actions}</code> constants
- * @param {String} action
- * @param {String[]}(Optional) List of available CRUD actions. Pass in list when executing multiple times for efficiency.
+ * @param {String} action Action to test for availability.
* @return {Boolean}
*/
isAction : function(action) {
<div id="method-Ext.data.Api-isValid"></div>/**
* Returns true if the supplied API is valid; that is, check that all keys match defined actions
* otherwise returns an array of mistakes.
- * @return {String[]||true}
+ * @return {String[]|true}
*/
isValid : function(api){
var invalid = [];
restify : function(proxy) {
proxy.restful = true;
for (var verb in this.restActions) {
- proxy.api[this.actions[verb]].method = this.restActions[verb];
+ proxy.api[this.actions[verb]].method ||
+ (proxy.api[this.actions[verb]].method = this.restActions[verb]);
}
// TODO: perhaps move this interceptor elsewhere? like into DataProxy, perhaps? Placed here
// to satisfy initial 3.0 final release of REST features.
return true;
break;
case 201: // entity created but no response returned
- res.success = true;
+ if (Ext.isEmpty(res.raw.responseText)) {
+ res.success = true;
+ } else {
+ //if the response contains data, treat it like a 200
+ return true;
+ }
break;
case 204: // no-content. Create a fake response.
res.success = true;
return this.success;
},
getStatus : function() {
- return this.status
+ return this.status;
},
getRoot : function() {
return this.root;
});
-</pre> \r
-</body>\r
+</pre>
+</body>
</html>
\ No newline at end of file