Hi everyone,
I’m trying to build my first backend screen, and I’m struggling on a (stupid I guess) issue for a week now.
I have a window showing tranmission records (traces of a sending towards an external system), and each transmission can have one or several logs associated. Therefore, I build a list with the tranmsissions, and this is working fine.
However, when I click on the pencil to get the details, I always get the same message:
„Shopware.apps.TransmissionLogs.view.detail.Window: Component requires a passed Shopware.data.Model in the record
property.“
I checked my code thousands of times and I’ve been looking everywhere, but I can’t figure out what’s wrong.
Here is my view/detail/window.js:
Ext.define('Shopware.apps.TransmissionLogs.view.detail.Window', {
extend: 'Shopware.window.Detail',
alias: 'widget.transmission-detail-window',
title : 'Transmission Logs details',
height: 270,
width: 680,
configure: function() {
return {
associations: [ 'logs' ] ,
controller: 'TransmissionLogs',
detail: 'Shopware.apps.TransmissionLogs.view.detail.Log'
}
}
});
Here is the /view/detail/Log.js:
Ext.define('Shopware.apps.TransmissionLogs.view.detail.Log', {
extend: 'Shopware.grid.Association',
alias: 'widget.transmission-detail-log-grid',
title: 'Log',
height: 300,
configure: function() {
return {
controller: 'TransmissionLogs',
columns: {
request: {
}
}
}
}
});
And here is the model/log.js, that I think I link correctly to the log.js detail window
Ext.define('Shopware.apps.TransmissionLogs.model.Log', {
extend: 'Shopware.data.Model',
configure: function() {
return {
related: 'Shopware.apps.TransmissionLogs.view.detail.Log'
};
},
fields: [
{ name: 'id', type: 'int' },
{ name: 'orderId', type: 'int' }
]
});
Can anyone tell me what I’m doing wrong?
Thank you!
Xavier.