【问题标题】:Sencha Touch - Incorrect version of Pullrefresh function being invokedSencha Touch - 调用的 Pullrefresh 函数版本不正确
【发布时间】:2013-08-07 09:07:55
【问题描述】:

我在以下代码中使用PullRefresh,但它在构建中不起作用:

        xtype:'dataview',
        mode:'multi',
        plugins: [
            {
                xclass: 'Ext.plugin.PullRefresh',
                fetchLatest: function(plugin) {
                    var json = localStorage.getItem("JSON");
                    Ext.Ajax.request({
                        method:'POST',
                        url:webservice_url,
                        params:{ params:json},
                        success:function (response) {
                            var storeobj = Ext.getStore('questions');
                            storeobj.sync();
                            storeobj.add(result.info.info);
                            storeobj.sync();
                        },
                        failure: function(res){
                            console.log('Failure');
                        }
                    });
                }
            }
        ],

当我运行构建时,pullRefresh.js 的 fetchLatest 函数被执行,而不是上面的 fetchLatest 函数。

【问题讨论】:

    标签: pull-to-refresh sencha-touch-2.2


    【解决方案1】:

    我和你的问题一样,可能是配置函数'fetchLatest'不是一个好主意。

    这可能是一个解决方案:

    http://www.sencha.com/forum/showthread.php?261763-PullRefresh-without-refreshFn&p=1007532#post1007532

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-10
      • 1970-01-01
      相关资源
      最近更新 更多