こんにちは、フォームを拡張しようとしています。このような commonItems のような補助プロパティを使用してアイテムを拡張できます..
Ext.define('PC.view.FormEvento', {
extend:'Ext.form.Panel',
id:'FormEvento',
url:'controller/action',
bodyPadding:10,
commonItems:[
{
xtype:'hiddenfield',
name:'id',
value:0
},
]});
..拡張されたアイテムのフォームと組み合わせると、このようになります
Ext.define('PC.view.FormEventoExtended', {
extend:'PC.view.FormEvento',
id:'FormEventoExtended',
title:'Evento Extended',
initComponent:function () {
var me = this;
Ext.applyIf(me, {
items:me.commonItems.concat(
[
{
xtype:'textfield',
fieldLabel:'personal1',
name:'personal1'
},
{
xtype:'textfield',
fieldLabel:'personal2',
name:'personal2'
}
])
});
me.callParent(arguments);
}
});
ここで、基本フォームの commonItems を拡張フォームの個人用アイテムに連結します。Ext 4 でネイティブにするフォームはありますか?