Hi ,
I have a form with a selected field that I would like to edit .
When loading the form the selected fields does not show the values that are already stored .
I have two models


Ext.define('app.model.mdcustomer', {
extend: 'Ext.data.Model',
alias: 'model.md',


uses: [
'app.model.mdvendorToSite'
],


config: {
hasOne: {
associationKey: '',
model: 'app.model.mdvendorToSite',
primaryKey: 'siteId',
getterName: 'getSite',
foreignKey: 'vendorToSite_id',
setterName: 'setSite'
},
fields: [
{
name: 'vendorToSite_id',
type: 'int'
},
{
name: 'account',
type: 'string'
},...

extend: 'Ext.data.Model',


config: {
idProperty: 'siteId',
fields: [
{
name: 'site',
type: 'string'
},
{
name: 'siteId',
type: 'int'
}
],
proxy: {
type: 'ajax',
url: 'Data/VendorToSite.json',
reader: {
type: 'json',
rootProperty: 'vendorToSite'
}
}
}
});

I want to show in a form "customer" , the right value in selected field

{
xtype: 'selectfield',
width: '50%',
label: 'Vendor To Site',
labelAlign: 'top',
displayField: 'site',
store: 'st_VendorToSite',
valueField: 'siteId'
}

I am loading the form like :
frmEdit.setRecord(storeCustomer.getAt(0));