I am passing a record in from the controller via:
showDetail: function (list, record) {
this.getMain().push({
xtype: 'leaddetail',
data: record.data
});
},
My View:
Ext.define('ApexChat.view.LeadDetail', {
extend: 'Ext.Panel',
xtype: 'leaddetail',
init: function() {
debugger;
},
config: {
styleHtmlContent: true,
scrollable: 'vertical',
title: 'Details',
frame: true,
labelwidth: 75,
items: [
{
xtype: 'fieldset',
columnWidth: 0.5,
collapsible: true,
title: 'Lead Information',
defaultType: 'textfield',
defaults: { anchor: '100%' },
layout: 'vbox',
items: [
{
fieldLabel: 'Name',
name: 'name',
tpl: '{name}',
value: '{name}',
disabled: true
},
{
fieldLabel: 'Email',
name: 'email',
value: '{email}',
disabled: true
},
{
fieldLabel: 'Phone',
name: 'phone',
value: '{phone}',
disabled: true
}
]
},
{
xtype: 'fieldset',
columnWidth: 0.5,
collapsible: true,
title: 'Exta Information',
defaultType: 'textfield',
defaults: { anchor: '100%' },
layout: 'vbox',
items: [
{
fieldLabel: 'Company Key',
name: 'companykey',
value: '{companyKey}',
disabled: true
},
{
fieldLabel: 'Chat ID',
name: 'chatid',
value: '{chatId}',
disabled: true
},
{
fieldtype: 'textarea',
fieldLabel: 'Notes',
name: 'notes',
value: '{notes}',
disabled: true
}
]
}
]
}
});
But inside the textfields i still see {companyName}
Assuming it cant be done like that, so how do I access the record being passed from the controller so I can do a .get('name') or something similar to that?