Sencha touch Sencha Touch 2.0列表分页插件可以在一个列表上工作,但不能在另一个列表上工作

Sencha touch Sencha Touch 2.0列表分页插件可以在一个列表上工作,但不能在另一个列表上工作,sencha-touch,extjs,Sencha Touch,Extjs,我在两个单独的选项卡中有两个列表,都连接到服务器端数据库。我正在尝试设置列表分页,在其中一个列表上,它的功能与它应该的完全一样。对于另一个列表,模型和存储与正确分页的列表具有所有相同的设置,但此列表底部不会显示“加载更多…”文本 关于列表分页插件,两个列表基本上是完全相同的(即商店、模型、“列表”视图),但其中一个页面根本不起作用。有人知道这可能是什么原因吗 使用更多信息进行编辑: 我正在使用Chrome进行开发。从网络上看,我似乎得到了正确的JSON,对于不起作用的网络,它返回了8条记录,返回

我在两个单独的选项卡中有两个列表,都连接到服务器端数据库。我正在尝试设置列表分页,在其中一个列表上,它的功能与它应该的完全一样。对于另一个列表,模型和存储与正确分页的列表具有所有相同的设置,但此列表底部不会显示“加载更多…”文本

关于列表分页插件,两个列表基本上是完全相同的(即商店、模型、“列表”视图),但其中一个页面根本不起作用。有人知道这可能是什么原因吗

使用更多信息进行编辑:

我正在使用Chrome进行开发。从网络上看,我似乎得到了正确的JSON,对于不起作用的网络,它返回了8条记录,返回的总属性是13(这很有意义,因为我已经将页面大小设置为8)

列表中不起作用的存储

    Ext.define("IdeaBank.store.SharedProblems", {
extend: "Ext.data.Store",
required: "IdeaBank.model.SharedProblem",
config: {
    model: "IdeaBank.model.SharedProblem",
    clearOnPageLoad: false,
    pageSize: 8,
    proxy: {
        type: 'ajax',
        api: {
            create:      "http://mywebsite.com/submitProblem.php?action=create",
            read: "http://mywebsite.com/submitProblem.php?action=read",
            update: "http://mywebsite.com/submitProblem.php?action=update",
            destroy: "http://mywebsite.com/submitProblem.php?action=delete",
        },
        reader: {
            type: 'json',
            rootProperty: "problems",
            totalProperty: "total",
        }
    },
    autoLoad: true
}
 });
Ext.define("IdeaBank.store.SharedSolutions", {
extend: "Ext.data.Store",
required: "IdeaBank.model.SharedSolution",
config: {
    model: "IdeaBank.model.SharedSolution",
    clearOnPageLoad: false,
    proxy: {
        type: 'ajax',
        api: {
            create: "http://mywebsite.com/submitSolution.php?action=create",
            read: "http://mywebsite.com/submitSolution.php?action=read",
            update: "http://mywebsite.com/submitSolution.php?action=update",
            destroy: "http://mywebsite.com/submitSolution.php?action=delete",
        },
        reader: {
            type: 'json',
            rootProperty: "solutions",
            totalProperty: "total",
        }
    },
    pageSize: 8,
    autoLoad: true
}
});
Ext.define("IdeaBank.view.SharedProblemsList", {
extend: 'Ext.dataview.List',
alias: 'widget.sharedproblemslist',
requires: ['Ext.plugin.ListPaging'],
config: {
    autoLoad: true,
    plugins: [
        {
            xclass: 'Ext.plugin.ListPaging',
            autoPaging: true

        }
    ],
    loadingText: "Loading...",
    emptyText: [
                "</pre><div class='notes-list-empty-text'  style = 'padding: 2em;'>",
                "<p>There are no problems listed for the category you have selected.</p>",
                "</div><pre>"
                ].join(""),
    onItemDisclosure: true,
    itemTpl: [
            "</pre>",
                "<div class = 'list-item-title'><span style = 'margin-right: 5px; color: #25E014; font-size: 0.7em;'>{rating}</span> {problem}</div>",
            "<pre>"
            ].join(""),
}

});
列表中有效的存储

    Ext.define("IdeaBank.store.SharedProblems", {
extend: "Ext.data.Store",
required: "IdeaBank.model.SharedProblem",
config: {
    model: "IdeaBank.model.SharedProblem",
    clearOnPageLoad: false,
    pageSize: 8,
    proxy: {
        type: 'ajax',
        api: {
            create:      "http://mywebsite.com/submitProblem.php?action=create",
            read: "http://mywebsite.com/submitProblem.php?action=read",
            update: "http://mywebsite.com/submitProblem.php?action=update",
            destroy: "http://mywebsite.com/submitProblem.php?action=delete",
        },
        reader: {
            type: 'json',
            rootProperty: "problems",
            totalProperty: "total",
        }
    },
    autoLoad: true
}
 });
Ext.define("IdeaBank.store.SharedSolutions", {
extend: "Ext.data.Store",
required: "IdeaBank.model.SharedSolution",
config: {
    model: "IdeaBank.model.SharedSolution",
    clearOnPageLoad: false,
    proxy: {
        type: 'ajax',
        api: {
            create: "http://mywebsite.com/submitSolution.php?action=create",
            read: "http://mywebsite.com/submitSolution.php?action=read",
            update: "http://mywebsite.com/submitSolution.php?action=update",
            destroy: "http://mywebsite.com/submitSolution.php?action=delete",
        },
        reader: {
            type: 'json',
            rootProperty: "solutions",
            totalProperty: "total",
        }
    },
    pageSize: 8,
    autoLoad: true
}
});
Ext.define("IdeaBank.view.SharedProblemsList", {
extend: 'Ext.dataview.List',
alias: 'widget.sharedproblemslist',
requires: ['Ext.plugin.ListPaging'],
config: {
    autoLoad: true,
    plugins: [
        {
            xclass: 'Ext.plugin.ListPaging',
            autoPaging: true

        }
    ],
    loadingText: "Loading...",
    emptyText: [
                "</pre><div class='notes-list-empty-text'  style = 'padding: 2em;'>",
                "<p>There are no problems listed for the category you have selected.</p>",
                "</div><pre>"
                ].join(""),
    onItemDisclosure: true,
    itemTpl: [
            "</pre>",
                "<div class = 'list-item-title'><span style = 'margin-right: 5px; color: #25E014; font-size: 0.7em;'>{rating}</span> {problem}</div>",
            "<pre>"
            ].join(""),
}

});
从不起作用的列表视图查看

    Ext.define("IdeaBank.store.SharedProblems", {
extend: "Ext.data.Store",
required: "IdeaBank.model.SharedProblem",
config: {
    model: "IdeaBank.model.SharedProblem",
    clearOnPageLoad: false,
    pageSize: 8,
    proxy: {
        type: 'ajax',
        api: {
            create:      "http://mywebsite.com/submitProblem.php?action=create",
            read: "http://mywebsite.com/submitProblem.php?action=read",
            update: "http://mywebsite.com/submitProblem.php?action=update",
            destroy: "http://mywebsite.com/submitProblem.php?action=delete",
        },
        reader: {
            type: 'json',
            rootProperty: "problems",
            totalProperty: "total",
        }
    },
    autoLoad: true
}
 });
Ext.define("IdeaBank.store.SharedSolutions", {
extend: "Ext.data.Store",
required: "IdeaBank.model.SharedSolution",
config: {
    model: "IdeaBank.model.SharedSolution",
    clearOnPageLoad: false,
    proxy: {
        type: 'ajax',
        api: {
            create: "http://mywebsite.com/submitSolution.php?action=create",
            read: "http://mywebsite.com/submitSolution.php?action=read",
            update: "http://mywebsite.com/submitSolution.php?action=update",
            destroy: "http://mywebsite.com/submitSolution.php?action=delete",
        },
        reader: {
            type: 'json',
            rootProperty: "solutions",
            totalProperty: "total",
        }
    },
    pageSize: 8,
    autoLoad: true
}
});
Ext.define("IdeaBank.view.SharedProblemsList", {
extend: 'Ext.dataview.List',
alias: 'widget.sharedproblemslist',
requires: ['Ext.plugin.ListPaging'],
config: {
    autoLoad: true,
    plugins: [
        {
            xclass: 'Ext.plugin.ListPaging',
            autoPaging: true

        }
    ],
    loadingText: "Loading...",
    emptyText: [
                "</pre><div class='notes-list-empty-text'  style = 'padding: 2em;'>",
                "<p>There are no problems listed for the category you have selected.</p>",
                "</div><pre>"
                ].join(""),
    onItemDisclosure: true,
    itemTpl: [
            "</pre>",
                "<div class = 'list-item-title'><span style = 'margin-right: 5px; color: #25E014; font-size: 0.7em;'>{rating}</span> {problem}</div>",
            "<pre>"
            ].join(""),
}

});
Ext.define(“IdeaBank.view.SharedProblemsList”{
扩展:“Ext.dataview.List”,
别名:“widget.sharedproblemslist”,
需要:['Ext.plugin.ListPaging'],
配置:{
自动加载:对,
插件:[
{
xclass:'Ext.plugin.ListPaging',
自动老化:真的吗
}
],
loadingText:“正在加载…”,
清空文本:[
"",
“所选类别没有列出任何问题。

”, "" ].加入(“”), 对,是的, 第三方物流:[ "", “{评级}{问题}”, "" ].加入(“”), } });
从有效的列表视图中选择列表视图

    Ext.define("IdeaBank.store.SharedProblems", {
extend: "Ext.data.Store",
required: "IdeaBank.model.SharedProblem",
config: {
    model: "IdeaBank.model.SharedProblem",
    clearOnPageLoad: false,
    pageSize: 8,
    proxy: {
        type: 'ajax',
        api: {
            create:      "http://mywebsite.com/submitProblem.php?action=create",
            read: "http://mywebsite.com/submitProblem.php?action=read",
            update: "http://mywebsite.com/submitProblem.php?action=update",
            destroy: "http://mywebsite.com/submitProblem.php?action=delete",
        },
        reader: {
            type: 'json',
            rootProperty: "problems",
            totalProperty: "total",
        }
    },
    autoLoad: true
}
 });
Ext.define("IdeaBank.store.SharedSolutions", {
extend: "Ext.data.Store",
required: "IdeaBank.model.SharedSolution",
config: {
    model: "IdeaBank.model.SharedSolution",
    clearOnPageLoad: false,
    proxy: {
        type: 'ajax',
        api: {
            create: "http://mywebsite.com/submitSolution.php?action=create",
            read: "http://mywebsite.com/submitSolution.php?action=read",
            update: "http://mywebsite.com/submitSolution.php?action=update",
            destroy: "http://mywebsite.com/submitSolution.php?action=delete",
        },
        reader: {
            type: 'json',
            rootProperty: "solutions",
            totalProperty: "total",
        }
    },
    pageSize: 8,
    autoLoad: true
}
});
Ext.define("IdeaBank.view.SharedProblemsList", {
extend: 'Ext.dataview.List',
alias: 'widget.sharedproblemslist',
requires: ['Ext.plugin.ListPaging'],
config: {
    autoLoad: true,
    plugins: [
        {
            xclass: 'Ext.plugin.ListPaging',
            autoPaging: true

        }
    ],
    loadingText: "Loading...",
    emptyText: [
                "</pre><div class='notes-list-empty-text'  style = 'padding: 2em;'>",
                "<p>There are no problems listed for the category you have selected.</p>",
                "</div><pre>"
                ].join(""),
    onItemDisclosure: true,
    itemTpl: [
            "</pre>",
                "<div class = 'list-item-title'><span style = 'margin-right: 5px; color: #25E014; font-size: 0.7em;'>{rating}</span> {problem}</div>",
            "<pre>"
            ].join(""),
}

});
Ext.define(“IdeaBank.view.SharedSolutionsList”{
扩展:“Ext.dataview.List”,
别名:“widget.sharedsolutionslist”,
需要:['Ext.plugin.ListPaging'],
配置:{
自动加载:对,
插件:[
{
xclass:'Ext.plugin.ListPaging',
自动老化:真的吗
}
],
loadingText:“正在加载…”,
清空文本:[
"",
“您选择的类别没有已发布的解决方案。”,
""
].加入(“”),
对,是的,
第三方物流:[
"",
“{rating}{title}”,
""
].加入(“”),
}
});

确保在服务器端代码中实现分页逻辑。您必须提供逐页发送的功能。可能是“submitSolution.php”“不部分发送数据。

Sencha Touch 1或2?你能给我们看一下你们名单上的代码吗。您在控制台中是否收到任何错误消息。是否可以为这两个列表发布代码?另外,如建议的,控制台中是否有任何内容?您在网络事务中看到了什么?你在使用chrome或safari开发工具吗?谢谢你回复我。我已经在帖子中添加了更多的细节,我也没有在控制台中收到任何错误。谢谢你的回复。通过检查来自服务器的响应,它似乎提供了所需的内容。奇怪的是,几周后,它决定重新开始工作。我一定是无意中删除/更改了导致它开始工作的某些内容,但我不知道它是什么。