Alex Rivera | Logout

How can I override the Ext JS JsonStore timeout?

Asked 2010-02-12T17:06:06.997
16

I have a JsonStore that needs to return from an HTTP request that takes longer than 30 seconds.

Setting the "timeout" property on either the JsonStore config doesn't override the 30-second timeout, neither does setting a proxy (rather than just setting the url property) and putting a timeout on the proxy.

How can I extend this timeout?

(I'm using Ext JS 3.1.1)

var ds = new Ext.data.JsonStore({
    autoSave:       true,
    method:         "POST",
    /*url:          "search-ajax.aspx",
    timeout:        120000,*/
    root:           "rows",
    totalProperty:  "results",
    idProperty:     "primarykeyvalue",
    proxy:      new Ext.data.HttpProxy({ url: "search-ajax.aspx", timeout: 120000 }),
    fields:     previewColumnConfig,
    baseParams: {
        Command:    "",
        ID:     primaryKeyValue,
        Entity: entityFullName,
        vetype: ValidationEntityType,
        vepk:       ValidationEntityPK,
        now:        (new Date()).getTime()
        },
    writer: new Ext.data.JsonWriter({
        encode:     true,
        listful:    false
        })
    });
Edit
Report

1 Answer

12

without defining the proxy or the connection in a var

proxy:      new Ext.data.HttpProxy(
              new Ext.data.Connection({
                          url: "search-ajax.aspx",
                          timeout: 120000 })),
answered 2011-03-04T10:46:30.640

Your Answer