Well, i have a application with a controller, that have all the logic of a grid panel for downloads, this grid panel is a view of controller (the grid who list the archives and an icon to download). Now i have a form who is managed by another controller and i need to put this grid inside of him, and this grid needs to use the functions by the archive controller. This is possible without replication of code? I'm trying do to something like this
function init() {
this.callParent(arguments);
this.control({
'academico-etpPersonalizadaForm': {
hide: this.onAcdEtpPersonalizadaFormHide,
afterrender: this.onEtpPersonalizadaRender
},...
formWidget.add(Ext.create('CoordSa.view.arquivo.List'),{
width: 500,
heigth: 600
});
But i'm getting this error
[E] Layout run failed
The 'formWidget' is the view who i want to render the grid downloader inside.
function onEtpPersonalizadaRender(formWidget) {
// console.log(record);
var x = formWidget.add({
title: 'Teste',
name: 'downloadgrid',
xtype: 'arquivoList',
width: 800,
heigth: 1000
});
console.log(x);
x.filters.addFilters({
'pssEtapa.pssEtpCodigo' : 1619
});
}
This actually show the grid, but now i have another problem, nothing appear inside of him, look the request
filter:[{"type":"numeric","comparison":"eq","value":"1619","field":"pssEtapa.pssEtpCodigo"}]
page:1
start:0
limit:0
sort:[{"property":"arqDescricao","direction":"ASC"}]
map:arqCodigo,arqNome,arqTipo,arqDescricao,pssEtapa.pssEtpCodigo,pssInscricao.pssInsCodigo,pssEdtCodigo,
And now the response
{
"success" : true,
"totalCount" : 2,
"items" : []
}
I need the data of the attribute 'map', but for some reason nothing comes back.