1. #1
    Ext User ritesh.kapse's Avatar
    Join Date
    May 2008
    Location
    Pune, India
    Posts
    120
    Vote Rating
    0
    ritesh.kapse is on a distinguished road

      0  

    Thumbs up [Solved]Stop the server request from store ?

    [Solved]Stop the server request from store ?


    Hi all,

    I am having a tabpanel with the following tabs :-

    simple form in first panel (tab1)...
    grid in the second panel(tab 2)...

    now when I click on tab 2, grid starts loading data from server.

    However while the data in tab 2 is still getting loaded (grid waiting for server response), if user moves to tab 1, I want to stop that grid request immediately. (because the data being loaded is now useless to me)

    any suggestions ?

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,115
    Vote Rating
    507
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    You'd have to go through a fair amount of layers to stop it, is it really that important?

    By the time the user has switched to tab1 the request has probably already completed.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Ext User ritesh.kapse's Avatar
    Join Date
    May 2008
    Location
    Pune, India
    Posts
    120
    Vote Rating
    0
    ritesh.kapse is on a distinguished road

      0  

    Default It is important...

    It is important...


    Yes this is important for me.... also i am fetching data using some complex database code and its really taking time to load Grid... I even had to increase the timeout for the url...

  4. #4
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,115
    Vote Rating
    507
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    I'd suggest you have a look at the source for the store, it should go something like:

    store -> proxy -> connection.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  5. #5
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    Try this:
    Code:
    Ext.Ajax.abort(store.proxy.activeRequest);
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  6. #6
    Ext User ritesh.kapse's Avatar
    Join Date
    May 2008
    Location
    Pune, India
    Posts
    120
    Vote Rating
    0
    ritesh.kapse is on a distinguished road

      0  

    Thumbs up thanks :)

    thanks :)


    Thanks hendricd,

    your code worked... i had to unmask the grid explicitly though...

    hears the code :-

    Code:
     Ext.Ajax.abort(searchStore.proxy.activeRequest);                                
                                    var gMask = Ext.getCmp('searchGrid').loadMask;
                                    if(typeof gMask == 'object'){
                                        gMask.hide();
                                    }

  7. #7
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    @ritesh.kapse -- Careful, it may be null:

    Code:
     Ext.Ajax.abort(searchStore.proxy.activeRequest);                                
     var gMask = Ext.getCmp('searchGrid').loadMask;
      if(gMask && gMask.hide){  gMask.hide();  }
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


Thread Participants: 2

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