In ExtJS5 I have a TreePanel with drag drop enabled. When I drag a node with children from a source tree to a target tree only the parent node is copied.
If I try a deep clone in the 'beforedrop' listener, it fails with the following error: Ext.data.Model.constructor(): Bad Model constructor argument 2 - "session" is not a Session
The view has a viewcontroller but does not have a viewmodel.
Tree definition in view:
xtype: 'treepanel',
itemId: 'myProjectsTree',
rootVisible: false,
viewConfig: {
plugins: {
ptype: 'treeviewdragdrop',
enableDrag: false,
enableDrop: true
},
listeners: {
beforedrop: 'doDrop',....
In controller:
doDrop: function(dropNode, dragNode, overModel) {
var node = dragNode.records[0];
var clonedNode = node.copy('111', true);<--- failed here
I have seen sessions defined in a viewmodel scenario. Does the copy function need to have viewmodel session defined ? Is there any way around this. Is there a bug in ExtJS5.
Any help is greatly appreciated!