0

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.

Juliano Grams
  • 525
  • 1
  • 5
  • 17
  • "Layout run failed" is a rather generic error that shows up if your views result in some faulty view sizing calculations ([proper definition here plus some debugging ideas](http://stackoverflow.com/questions/11533769/understanding-layout-run-failure-error-logging)). We are going to need to see more code (like where the form widget is initialized, the onEtpPersonalizedRender, etc.) – SelfSurgery Sep 15 '15 at 14:00
  • I would guess this is likely related to formwidget (or maybe some other view). It seems Ext is trying to reclaculate layout and failing. Does the conatiner have any type of layout defined? Maybe posting the views definitions would help. – Pedro Reis Sep 15 '15 at 17:37

0 Answers0