View Full Version : Direct calls throws too much recursion Error

19 Nov 2009, 8:36 AM
Hi guys,

I recently started to work with Ext.Direct and it is really great :D, well it was a pleasure until i found a problem, i don't know if it is a bug or i'm doing something worng (wich could be the case but how to know), wel my case is this:

I have a form in which i want to load some data, and i'm using the direct api, here the code

FormBase = Ext.extend(Ext.Window, {
modal: true,
layout: 'fit',
height: 500,
width: 500,
formXtype: null,
initComponent: function() {
Ext.apply(this, {
items: this.form = new Ext.form.FormPanel({
api: this.api,
paramOrder: ['Id'],
layout: 'fit',
frame: false,
border: false,
items: {
xtype: this.formXtype
buttons: [{
text: 'Save',
handler: this.onSave,
scope: this
}, {
text: 'Cancel',
handler: function() {
scope: this


onRender: function() {
FormBase.superclass.onRender.apply(this, arguments);
if (!Ext.isEmpty(this.RecordId)) {
params: {
Id: this.RecordId

the this.api variable handles the specific api specification for the module, in this case it is

api: {
submit: ManageChildren.SaveForm,
load: ManageChildren.LoadForm,
destroy: ManageChildren.DeleteForm

the direct api config is this

Purple.REMOTING_API={ "actions" : {
"ManageChildren" : [ { "len" : 4,
"name" : "GetList"
{ "len" : 1,
"name" : "LoadForm"
{ "len" : 1,
"name" : "DeleteForm"
{ "formHandler" : true,
"len" : 1,
"name" : "SaveForm"
"type" : "remoting",
"url" : "/DirectRouter.ashx"

I'm doing this because the form is loaded as a result of a double click event in a grid where i show the child data, but when the form is shown the browser freezes and after a few seconds firefox shows me the error:

too much recursion ext-all-debug.js (línea 11532 [the line varies])

}else if(Ext.isArray(o)){\n

I'm also trying to perform de thelete using the api ManageChildren.DeleteForm(id); with the same too much recursion error result.

Am i doing something wrong?



21 Nov 2009, 2:24 PM
paramsAsHash: false

I always set this with or without parameters being passed. I stopped having the recursion problem.

23 Nov 2009, 6:45 AM
Thank you aritchie!!!

That solved my problem :D