I have a problem like you help.
I have the following codes:
Model:
Code:
Ext.define('EstudoExt.model.Estado',{
extend: 'Ext.data.Model',
idProperty: 'modelEstado',
fields: [
{
name: 'id_estado',
type: 'int'
},
{
name: 'nome',
type: 'string'
}
]
});
Store:
Code:
Ext.define('EstudoExt.store.Estados',{
extend: 'Ext.data.Store',
model: 'EstudoExt.model.Estado',
storeId : 'Estados',
autoLoad: true,
proxy: {
type: 'ajax',
url: 'data/estados.json',
reader: {
root: 'data',
type: 'json',
successProperty: 'success'
}
}
});
Combo:
Code:
Ext.define('EstudoExt.view.pessoaJuridica.ComboEstado', {
extend: 'Ext.form.field.ComboBox',
alias: 'widget.estadoCombo',
name : 'id_estado',
ref: 'id_estado',
fieldLabel: 'Estados',
store: 'Estados',
displayField: 'nome',
valueField: 'id_estado',
queryMode: 'local',
typeAhead: true,
forceSelection: true,
initComponent: function() {
this.callParent(arguments);
}
});
Code:
Ext.require('EstudoExt.view.pessoaJuridica.ComboEstado');
Ext.define('EstudoExt.view.pessoaJuridica.Edit', {
extend: 'Ext.window.Window',
alias : 'widget.pessoaJuridicaEdit',
title : 'Edição de Pessoa Juridica',
layout: 'fit',
autoShow: true,
modal: true,
width: 300,
height: 450,
initComponent: function() {
this.items = [{
xtype:'tabpanel',
activeTab: 0,
defaults:{
bodyStyle:'padding:10px'
},
items:[{
title:'Dados da Empresa',
defaultType: 'textfield',
items: [{
xtype: 'estadoCombo'
},{
fieldLabel: 'Nome Fantasia',
name: 'nome_fantasia',
allowBlank: false
},{...
when the view loads I get the error: c.store is undefined (ext-all.js - line 15)
I don't know what happened!