javascript - Overriding existing mapping in ExtJS 5.1.1 -
i creating viewport class , includes 3 items inside; header 'container.container' base class, grid 'grid.panel' , form form.panel.
the problem extjs overrides header created , renders 'grid panel'; guess contains smaller 'header' inside panel , gives errors:
[w] overriding existing mapping: 'widget.header' 'ext.panel.header' 'employee.view.mainheader'. intentional? [w] overriding existing mapping: 'widget.gridpanel' 'ext.grid.panel' 'employee.view.gridpanel'. intentional?
this how like! have not define alias neither header class nor gridpanel. gave xtype property thats all. why happen?
thank you?
here header:
ext.define('employee.view.mainheader', { extend: 'ext.container.container', xtype: 'header', requires: [ 'ext.button.button', 'ext.form.field.text' ], layout: { type: 'hbox', align: 'center' }, initcomponent: function() { var me = this; ext.apply(me, { items: [{ xtype: 'container', width: 600, padding: 5, items: [{ xtype: 'image', height: 95, width: 95, src: 'https://openclipart.org/image/2400px/svg_to_png/69109/free-culture-logo-orange.png' }] }, { xtype: 'container', cls: 'search', items: [{ xtype: 'textfield', width: 350 }, { xtype: 'button', text: 'search', handler: function () { alert('this search feature!'); } }] }] }); me.callparent(arguments); } });
and gridpanel:
ext.define('employee.view.gridpanel', { extend: 'ext.grid.panel', xtype: 'gridpanel', store: 'employeestr', title: 'orest employee table', viewconfig: { markdirty: false, striperows: false }, initcomponent: function () { var me = this; ext.apply(me, { tools: [{ type: 'refresh', tooltip: 'refresh db', handler: function () {alert('refresh click');} }], columns: [{ xtype: 'numbercolumn', dataindex: 'id', flex: 0, text: 'id' }, { xtype: 'gridcolumn', dataindex: 'code', flex: 1, text: 'code' }, { xtype: 'gridcolumn', dataindex: 'firstname', flex: 1, text: 'first name' }, { xtype: 'gridcolumn', dataindex: 'lastname', flex: 1, text: 'last name' }, { xtype: 'gridcolumn', dataindex: 'email', flex: 1, text: 'email' }, { xtype: 'gridcolumn', dataindex: 'active', flex: 0, text: 'status' }], dockeditems: [{ xtype: 'pagingtoolbar', store: 'employeestr', dock: 'bottom', displayinfo: true }] }); me.callparent(arguments); } });
it seems overwrite via xtype settings (gridpanel, header) predefined aliases defined extjs.
take @ source code of e.g. extjs gridpanel:
... alias: ['widget.gridpanel', 'widget.grid'] ...
the warning should gone if define other names xtype should anyway in order distinguish between components , thos eprovided extjs.
Comments
Post a Comment