【问题标题】:ExtJS 3.0.0 autoreload json storeExtJS 3.0.0 自动重载 json 存储
【发布时间】:2015-06-08 03:33:28
【问题描述】:

我需要每隔 2 分钟自动重新加载图表的 json 存储。

这是我的代码:

tab = new Ext.Panel({
    id: "id-" + node.id,
    closable: true,
    title: node.attributes.text,
    layoutConfig: {
        columns: 3
    },
    defaults: {
        frame: true,
        height: 230,
        border: true
    },
    items: [
        new Ext.chart.LineChart({
            store: new Ext.data.JsonStore({
                url: 'dashboard/CantServicios',
                root: 'cantservicio',
                autoLoad: true,
                ields: ['NOMBRE_SERVICIO', 'CANT']
            }),
            xField: 'NOMBRE_SERVICIO',
            yField: 'CANT',
            width: 840
        })
    ]
});

我该怎么做?

【问题讨论】:

    标签: json extjs3


    【解决方案1】:

    您可以使用 Ext.util.TaskRunner 来做到这一点

    http://docs.sencha.com/extjs/3.4.0/?mobile=/api/Ext.util.TaskRunner

    因此,如果您查看上面文档链接中的示例,您应该会看到您可以轻松定义一个仅在您的商店中执行加载的函数,然后只需将其用作运行配置选项即可。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-05-24
      • 1970-01-01
      • 2013-04-16
      • 1970-01-01
      • 2013-02-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多