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; }
11 <script type="text/javascript">
12 function highlight() {
13 document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
17 <body onload="prettyPrint(); highlight();">
18 <pre class="prettyprint lang-js"><span id='Ext-direct-RemotingMethod'>/**
19 </span> * Small utility class used internally to represent a Direct method.
20 * @class Ext.direct.RemotingMethod
23 Ext.define('Ext.direct.RemotingMethod', {
25 constructor: function(config){
27 params = Ext.isDefined(config.params) ? config.params : config.len,
30 me.name = config.name;
31 me.formHandler = config.formHandler;
32 if (Ext.isNumber(params)) {
33 // given only the number of parameters
38 * Given an array of either
40 * b) Objects with a name property. We may want to encode extra info in here later
43 Ext.each(params, function(param){
44 name = Ext.isObject(param) ? param.name : param;
50 <span id='Ext-direct-RemotingMethod-method-getCallData'> /**
51 </span> * Takes the arguments for the Direct function and splits the arguments
52 * from the scope and the callback.
53 * @param {Array} args The arguments passed to the direct call
54 * @return {Object} An object with 3 properties, args, callback & scope.
56 getCallData: function(args){
67 scope = args[len + 1];
69 data = args.slice(0, len);
72 data = Ext.apply({}, args[0]);
76 // filter out any non-existent properties
78 if (data.hasOwnProperty(name)) {
79 if (!Ext.Array.contains(params, name)) {