【问题标题】:List paging in nestedlist嵌套列表中的列表分页
【发布时间】:2013-04-04 12:47:27
【问题描述】:

是否可以在嵌套列表中使用列表分页插件?当我直接放置代码时,应用程序将不再工作。

我的代码:

requires: ['Ext.field.Search','Ext.Toolbar','Ext.plugin.ListPaging'],
    config: {
        store: 'CatalogStore',
        plugins: [
            {
                xclass: "Ext.plugin.ListPaging",
                autoPaging: true
            }
        ],

我的商店:

Ext.define('Catalog_Demo.store.CatalogStore', {
    extend: 'Ext.data.TreeStore',
    requires: ['Catalog_Demo.model.CatalogModel'],
    config :{
        model: 'Catalog_Demo.model.CatalogModel',
        proxy: {
            type: 'ajax',
            url: 'enter code hereosc_demo.php',

            reader:{
                type: 'json',
                rootProperty: 'categories'
                }
            },
        pageSize: 2,
        autoLoad: true,
    }
});

显示如下错误

未捕获的类型错误:无法调用未定义的方法“getScroller”
ListPaging.js:114

有什么原因吗?

【问题讨论】:

    标签: sencha-touch-2 nested-lists


    【解决方案1】:

    您必须将插件配置放在嵌套列表的listConfig 中。所以你发布的代码 sn-p 会变成这样:

    requires: ['Ext.field.Search','Ext.Toolbar','Ext.plugin.ListPaging'],
    config: {
        store: 'CatalogStore',
        listConfig: {
                plugins: [
                {
                    xclass: "Ext.plugin.ListPaging",
                    autoPaging: true
                }
            ],       
        }
    }
    

    【讨论】:

      猜你喜欢
      • 2018-08-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多