PDA

View Full Version : [OPEN] NodeInterface.copy needs maintenance



dfrederick
4 Jun 2014, 5:25 PM
Hi,
The NodeInterface.copy method has a different signature than the model.copy method. Passing deep=true causes an error - "session" is not a session.
This is because it's passed through the callParent as an argument.
NodeInterface:

copy: function(newId, deep) { var me = this, result = me.callParent(arguments), len = me.childNodes ? me.childNodes.length : 0, i;
copy: function (newId, session) { var me = this, data = Ext.apply({}, me.data), idProperty = me.idProperty, T = me.self; if (newId || newId === 0) { data[idProperty] = newId; } else if (newId === null) { delete data[idProperty]; } return new T(data, session); },

mitchellsimoens
5 Jun 2014, 4:04 AM
Thanks for the report! I have opened a bug in our bug tracker.

jfenety
18 Sep 2014, 11:51 AM
I am waiting on a fix for this as well.