initComponent: function() {
this.items = [
{
xtype: 'form',
padding: '5 5 0 5',
border: false,
style: 'background-color: #fff;',
fieldDefaults: {
anchor: '100%',
labelAlign: 'left',
allowBlank: false,
combineErrors: true,
msgTarget: 'side'
},
items: {
xtype:'tabpanel',
activeTab: 0,
defaults:{
bodyPadding: 10,
layout: 'anchor'
},
items:[{
title:'Общая информация',
defaultType: 'textfield',
defaults: {
anchor: '100%'
},
items: [
{
xtype: 'textfield',
name : 'id',
fieldLabel: 'id',
hidden:true
},
{
...
},
{
xtype: 'combo',
fieldLabel: 'Отдел',
name : 'otdel',
store: Ext.create('Ext.data.JsonStore', {
proxy: {
type: 'ajax',
url: 'php/otdel.php',
reader: {
type: 'json',
root: 'contatos',
successProperty: 'success',
}
},
idIndex: 0,
autoload: true,
fields: [
{name: 'id'},
{name: 'otdel'}
]
}),
triggerAction: 'all',
displayField: 'otdel',
valueField: 'id',
},
{
xtype: 'combo',
fieldLabel: 'Должность',
name : 'rol',
store: new Ext.create('Ext.data.JsonStore', {
proxy: {
type: 'ajax',
url: 'php/rol.php',
reader: {
type: 'json',
root: 'contatos',
successProperty: 'success',
totalProperty: 'totalCount'
}
},
idIndex: 0,
autoload: true,
fields: [
{name: 'id'},
{name: 'rol'}
]
}),
triggerAction: 'all',
displayField: 'rol',
valueField: 'id',
{...},
]}]
}}
];