PDA

View Full Version : HierarchyRequestError: Node cannot be inserted at the specified point in the hierarch



bothman
7 Dec 2015, 12:37 AM
Hi
I get this error


HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy




target.insertBefore(item.el.dom, position || null);






and this is my view class



Ext.define('IN.view.item.UserConfig', {
extend : 'Ext.Viewport',
alias : 'widget.itemuserconfig',
layout : {
type : 'border',
padding : 5
},
defaults : {
split : false
},
initComponent : function() {
this.items = [{
region : 'north',
collapsible : false,
split : false,
height : 30,
html : 'header',
minHeight : 30

}, {
region : 'center',
id : 'center-panel',
height : 50,
store : 'Items',
loadMask : true,
autoheight : true,
dockedItems : [{
xtype : 'pagingtoolbar',
store : 'Items',
dock : 'bottom',
displayInfo : true,
items : []
}],

items : cw = Ext.create('Ext.grid.Panel', {
title : 'List of Items',
store : 'Items',
loadMask : true,
autoheight : true,

columns : [{
header : 'Item Number',
dataIndex : 'item',
flex : 1
}, {
header : 'Description 1',
dataIndex : 'desc1',
flex : 1
}, {
header : 'Description 2',
dataIndex : 'desc2',
flex : 1
}, {
header : 'Weight',
dataIndex : 'weight',
flex : 1
}]

}),
bbar : ['', ' ', {
text : 'Edit',
listeners : {
click : function() {
if (cw.getSelectionModel()
.hasSelection()) {
var row = cw.getSelectionModel()
.getSelection()[0];
Ext.getCmp('userNameId')
.setValue((row
.get('userName'))
.toString());
Ext.getCmp('passwordId')
.setValue((row
.get('password'))
.toString());
}
Ext.resumeLayouts(true);
}
}
}]
}, {
region : 'west',
collapsible : true,
floatable : false,
split : false,
width : 200,
minWidth : 120,
minHeight : 140,
title : 'Filter'
}, {
region : 'south',
height : 200,
split : false,
collapsible : false,
title : 'User',
weight : -100,
items : [{
xtype : 'textfield',
labelWidth : 70,
fieldLabel : 'User Name',
id : 'userNameId'
}, {
xtype : 'textfield',
labelWidth : 70,
fieldLabel : 'Password',
id : 'passwordId'
}]
}, {
region : 'south',
collapsible : false,
split : false,
height : 30,
html : 'footer'
}]
this.callParent();
}

});




and my app.js


Ext.Loader.setConfig({
enabled : true
});

Ext.onReady(function() {
Ext.application({

name : 'IN',

appFolder : 'app',

controllers : ['Items'],

launch : function() {
Ext.create('Ext.container.Viewport', {
items : [{
xtype : 'itemuserconfig'
}]
});
}
});
})

any help?

Gary Schlosberg
7 Dec 2015, 4:06 PM
Are you able to recreate this in a runnable test case?
https://fiddle.sencha.com/#home

bothman
9 Dec 2015, 11:43 AM
the problem was that I extend this file from viewport
I changed view port to panel and every thing work fine now

thanks