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; }
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 * Thi class is used internally.
21 * @class Ext.direct.RemotingMethod
24 Ext.define('Ext.direct.RemotingMethod', {
26 constructor: function(config){
28 params = Ext.isDefined(config.params) ? config.params : config.len,
31 me.name = config.name;
32 me.formHandler = config.formHandler;
33 if (Ext.isNumber(params)) {
34 // given only the number of parameters
39 * Given an array of either
41 * b) Objects with a name property. We may want to encode extra info in here later
44 Ext.each(params, function(param){
45 name = Ext.isObject(param) ? param.name : param;
51 <span id='Ext-direct-RemotingMethod-method-getCallData'> /**
52 </span> * Takes the arguments for the Direct function and splits the arguments
53 * from the scope and the callback.
54 * @param {Array} args The arguments passed to the direct call
55 * @return {Object} An object with 3 properties, args, callback & scope.
57 getCallData: function(args){
68 scope = args[len + 1];
70 data = args.slice(0, len);
73 data = Ext.apply({}, args[0]);
77 // filter out any non-existent properties
79 if (data.hasOwnProperty(name)) {
80 if (!Ext.Array.contains(params, name)) {