【问题标题】:Extjs : url in storeExtjs:商店中的网址
【发布时间】:2015-04-11 18:22:10
【问题描述】:

这是我的商店

给出网址:'/rest/helloworld/submit',

var store = Ext.create('Ext.data.Store', {
    autoLoad: false,
    fields: ['name', 'date', 'email'],
    pageSize: 10, // items per page
    proxy: {
        method: 'GET',
        url: '/rest/helloworld/submit',
        disableCaching: false,
        type: 'json',
        root: 'result',
        totalProperty: 'total'
    }
});

但正如我在浏览器的控制台中看到的那样。

对 url 的请求类似于:请求 URL:http://localhost:8080/JAXRS-HelloWorld/proxy/json.js?_dc=1428776089867

我还添加了 disableCaching : false

但它仍然显示 _dc=1428776089867

请帮忙

【问题讨论】:

    标签: javascript extjs extjs4 extjs4.1 extjs4.2


    【解决方案1】:

    尝试使用ajax 代理和noCache 属性:

    var store = Ext.create('Ext.data.Store', {
        autoLoad: false,
        fields: ['name', 'date', 'email'],
        pageSize: 10, // items per page
        proxy: {
            method: 'GET',
            url: '/rest/helloworld/submit',
            noCache: false,
            type: 'ajax',
            root: 'result',
            totalProperty: 'total'
        }
    });
    

    【讨论】:

    • 是的,它可以工作,但是它发送像localhost:8080/rest/helloworld/… 这样的请求,所以我需要接收开始,限制广告页面作为函数中的参数。对吗?
    猜你喜欢
    • 2014-02-11
    • 1970-01-01
    • 2021-06-03
    • 1970-01-01
    • 1970-01-01
    • 2011-08-28
    • 2014-09-06
    • 1970-01-01
    • 2012-10-01
    相关资源
    最近更新 更多