1. #1
    Ext JS Premium Member
    Join Date
    Aug 2011
    Posts
    21
    Vote Rating
    0
    kshatalov@citco.com is on a distinguished road

      0  

    Default AJAX global default timeout

    AJAX global default timeout


    Hello All

    I can't seem to overwrite the global ajax timeout of 30 seconds.
    If I try to update the timeout globally to 45 seconds, it still times out after 30 seconds.

    Ext.Ajax.timeout = 45000;

    If I set timeout on ajax proxy on data store to 45 seconds it works. What am I don't wrong? I want to change timeout globally instead of setting it on every datastore.

    Ext.create('Ext.data.Store', {
    ....
    proxy: {
    type: 'ajax',
    timeout: 45000,
    ...
    }

    I should also add that I am using extjs 4.

    Thank you for your help.

  2. #2
    Sencha User
    Join Date
    Jun 2010
    Location
    Gandhinagar, Gujarat, India
    Posts
    11
    Vote Rating
    0
    kanny is on a distinguished road

      0  

    Default


    I had done that like this in Ext 3, Ext override doesn't seem to be changed in Ext 4 so this should work.

    Connection class is base of all ajax requests so it will extend time for any kind of ajax request.


    Code:
    Ext.override(Ext.data.Connection, {
            timeout:45000
    }

  3. #3
    Sencha User nickbretz's Avatar
    Join Date
    Jul 2011
    Location
    Kansas City, MO
    Posts
    12
    Vote Rating
    3
    nickbretz is on a distinguished road

      1  

    Default


    When using an Ajax Proxy, rather than just an Ajax Request, you will need to do:

    Code:
    Ext.override(Ext.data.proxy.Ajax, { timeout:60000 });

  4. #4
    Ext JS Premium Member
    Join Date
    Aug 2011
    Posts
    21
    Vote Rating
    0
    kshatalov@citco.com is on a distinguished road

      0  

    Default


    Thank you very much. This did the trick.

  5. #5
    Sencha Premium Member
    Join Date
    Jun 2011
    Location
    Hartford, CT
    Posts
    16
    Vote Rating
    0
    garberfc is on a distinguished road

      0  

    Question


    Quote Originally Posted by kshatalov@citco.com View Post
    Thank you very much. This did the trick.
    Which snippet of code 'did the trick'?

  6. #6
    Sencha Premium Member
    Join Date
    Jun 2011
    Location
    Hartford, CT
    Posts
    16
    Vote Rating
    0
    garberfc is on a distinguished road

      0  

    Default


    Quote Originally Posted by kanny View Post
    I had done that like this in Ext 3, Ext override doesn't seem to be changed in Ext 4 so this should work.

    Connection class is base of all ajax requests so it will extend time for any kind of ajax request.


    Code:
    Ext.override(Ext.data.Connection, {
            timeout:45000
    }
    Syntax error in the above...
    Code:
    Ext.override(Ext.data.Connection, {
            timeout:45000
    });

  7. #7
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,190
    Vote Rating
    76
    ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough

      0  

    Default


    If you are using ExtJS 4.x there is no need to do an override, Ext.Ajax is singleton so the only thing you have to do is:

    Ext.Ajax.timeout = 45000;
    UI: Sencha Architect 3.x / ExtJS 4 MVC
    Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
    Application Server: Glassfish 3.1.x
    Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5

    If you like my answer please vote!

  8. #8
    Ext JS Premium Member
    Join Date
    Mar 2010
    Location
    Northern Virginia
    Posts
    54
    Vote Rating
    3
    aghextjs is on a distinguished road

      0  

    Default


    Check out this related post in the forums.

    http://www.sencha.com/forum/showthre...l=1#post759207

    It covers all of the timeout settings.

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar