无法在ExtJS4中加载组合的存储

感觉RC

加载视图时,我无法加载商店数据。这是我的商店:(strEstadosMtoOrganismos.js)

Ext.define('TelicitaApp.store.filtros.strEstadosMtoOrganismos', {
extend: 'Ext.data.Store',
model:  'TelicitaApp.model.filtros.mdlEstadosMtoOrganismos',
autoLoad: false,
proxy: {
    type: 'ajax',
    api: {read: './data/php/filtros/Tmc_EstadosMtoOrganismos.php?despliegue='+TelicitaApp.Settings.despliegue},
    reader: {
                type: 'json',
                root: 'data',
                totalProperty: 'total',
                successProperty: 'success'
    }
}
});

这是我的观点:(viewGridMtoOrganismos.js)

Ext.define('TelicitaApp.view.mantenimientos.organismos.viewGridMtoOrganismos', {
extend: 'Ext.grid.Panel',
alias: 'widget.viewGridMtoOrganismos',
requires: [
],
initComponent: function() {
    var toolbar1 = {
            xtype : 'toolbar',
            dock : 'top',
            items: [
                    {
                        iconCls:'limpiar-icon', text:'Limpiar', handler:  function()    {},
                    },
                    '->',
                    {
                        iconCls:'refresh', text:'Recargar', handler:  function()    {},
                    }
            ]
    };

    var toolbar2 = {
            xtype: 'toolbar',
            dock: 'top',
            items: [
                    {text:'<span style="color:#C85E00;">Estado</span>'},
                    {
                        xtype: 'combo',
                        value: 'Todos',
                        queryMode: 'remote',
                        triggerAction: 'all',
                        editable: false,
                        displayField: 'label',
                        valueField: 'value',
                        store: 'filtros.strEstadosMtoOrganismos'
                    }
            ]
    }   

    Ext.apply(this, {
        frame: true,
        bodyPadding: '5 5 0',
        fieldDefaults: {
            labelAlign: 'top',
            msgTarget: 'side'
        },
        forceFit: true,
        height: 300,
        stripeRows: true,
        loadMask: true,
        tbar: {
            xtype: 'container',
            layout: 'anchor',
            defaults: {anchor: '0'},
            defaultType: 'toolbar',
            items: [
                    toolbar1,toolbar2
            ]           
        },
        columns: [
                  {header:'<span style="color:blue;">Id</span>', xtype: 'numbercolumn',format:'0',  width:35, sortable: true},
        ]
    });
    this.callParent(arguments);
}
});

这是我的控制器:(ctrlMtoOrganismos.js)

Ext.define('TelicitaApp.controller.ctrlMtoOrganismos', {
extend: 'Ext.app.Controller',
models:[
        'mantenimientos.organismos.mdlMtoOrganismos',
        'filtros.mdlEstadosMtoOrganismos'

],
stores:[
        'mantenimientos.organismos.strMtoOrganismos',
        'filtros.strEstadosMtoOrganismos'
],
views: [ 
        'mantenimientos.organismos.viewModuloMtoOrganismos'
],
refs: [
],
init: function() {
    this.control({

    });
},
onLaunch: function() {

},
});

如果将商店中的autoload属性设置为true,则会在应用启动时加载数据。但是我想在加载视图时加载数据。加载视图后,如果我展开组合,则会启动php文件以填充该组合,但是我希望它在加载视图后自动加载数据,而不是在展开组合时自动加载数据。

亚历山大大帝

代替

    this.callParent(arguments);
}

    this.callParent(arguments);
    this.down('combo').getStore().load();
}

而且你很好走。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

在ExtJS4中使用新的URL重新加载网格存储

来自分类Dev

在某些extjs4的组合框中显示空格字符

来自分类Dev

动态存储区未在组合框extjs中加载数据

来自分类Dev

ExtJS4:克隆表单中的Fieldset

来自分类Dev

无法使用extjs4读取和设置Json数据

来自分类Dev

在extjs4中的列中搜索网格

来自分类Dev

extjs4中的Google Places自动完成

来自分类Dev

extjs4边框布局中的重叠面板

来自分类Dev

extjs4中的视口面板是什么

来自分类Dev

在extjs4中更改树节点的背景色

来自分类Dev

无法在Spring4中加载静态文件

来自分类Dev

ExtJS4转换组合框onchange()事件不起作用

来自分类Dev

Extjs 4.1-如何等待组合中的所有存储区被加载

来自分类Dev

动态更改 extjs 中的组合框存储

来自分类Dev

将存储负载从视图更改为控制器ExtJS4

来自分类Dev

将商店加载到ExtJS 4中的组合框时如何发送额外的参数?

来自分类Dev

Extjs4 BoxSelect的DisplayField问题

来自分类Dev

如何使简单的分页extjs4

来自分类Dev

Extjs4和IE8:选项卡上的beforeclose事件引发“无法执行释放脚本中的代码”

来自分类Dev

如何在extjs4中的不同B类函数中从A类调用函数

来自分类Dev

无法在JRE 8中加载字体

来自分类Dev

时区无法在Go 1.13中加载

来自分类Dev

无法在Solr 4.4中加载KeywordRepeatFilter

来自分类Dev

无法在片段中的WebView中加载URL

来自分类Dev

如何在extjs4 [MVC]中实现秒表功能

来自分类Dev

正则表达式中的Extjs4尾随\

来自分类Dev

无法从SRAM中加载/存储数据:读取的数据未知

来自分类Dev

无法在Mono / xsp4中加载类型'System.Web.Http.WebHost.HttpControllerHandler'

来自分类Dev

无法在sphinx4中加载en-us-semi模型

Related 相关文章

热门标签

归档