PDA

View Full Version : set child component using real class name (not xtype)



dedoz
28 Mar 2012, 9:54 AM
is there a way to set a child component using the real class name instead of its xtype ?

something like


Ext.define('somecomponent',
{ extend : 'something'
items: [
{ xtype: 'form', <-- instead of this
class : 'Ext.form.Panel' <-- something like this
}
]
}

mitchellsimoens
28 Mar 2012, 10:13 AM
You can use xclass:


new Ext.panel.Panel({
renderTo : document.body,
width : 400,
items : [
{
xtype : 'panel',
frame : true,
height : 200,
title : 'xtype'
},
{
xclass : 'Ext.panel.Panel',
frame : true,
height : 200,
title : 'xclass'
}
]
});

dedoz
30 Mar 2012, 9:12 PM
actually is not working, looking at the source code seems like xtype is the only way to do it,
xclass is ignored.