Hybrid View

  1. #1
    Sencha User
    Join Date
    Jul 2012
    Location
    Arlington, VA
    Posts
    14
    Vote Rating
    0
    varunet is on a distinguished road

      0  

    Default Unanswered: How to clear proxy?

    Unanswered: How to clear proxy?


    I am loading a list from the store which is getting data from a search engine in JSON format.

    To the list, I have implemented the "ListPaging" plugin and the pagination is working fine.
    It appropriately increments the "start" attribute to get the right data.

    I am having a problem, if I am trying to reuse and reload the list with another set of data. As I want to reset the "start" property to 0. The store data gets cleared appropriately, but I am not able to clear the proxy data.
    How do I approach this? has the clear api depricated for the proxy?

    this following code is there in my controller.
    var store = Ext.StoreManager.get('Projects');
    store.data.clear(); // this works fine
    store.getProxy().clear(); // Gives me the error "Uncaught TypeError: Object [object Object] has no method 'clear'"
    store.getProxy().setExtraParam('start', '0'); // this sets it at 0, but then the ListPaging stops working and the 'start' value does not increment any more.

    store.load();

    Thank you for your help.

  2. #2
    Sencha User
    Join Date
    Apr 2010
    Posts
    78
    Answers
    4
    Vote Rating
    1
    kskrumpet is on a distinguished road

      0  

    Default


    I'm a but unclear what you're trying to acheive here - I can't imaging a sitation where I wouldn't use the loadPage method on the store.

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Location
    Arlington, VA
    Posts
    14
    Vote Rating
    0
    varunet is on a distinguished road

      0  

    Default


    Sorry, If I was unclear..

    The list component is in the view and not in the store. I am using the store to just load data into the list component. All this is done through a controller.

    everything is working fine.. just trying to figure out on how to reset 'start' / 'startParam' to 0. When new set of data is loaded.

  4. #4
    Sencha User
    Join Date
    Oct 2012
    Posts
    17
    Answers
    1
    Vote Rating
    0
    transwebsolutions is on a distinguished road

      0  

    Default


    i am probably shooting in the dark with this answer. have you tried creating a blank json file and load the empty json file.

  5. #5
    Sencha User siebmanb's Avatar
    Join Date
    Aug 2011
    Location
    Geneva (CH) - Grenoble (FR)
    Posts
    253
    Answers
    11
    Vote Rating
    15
    siebmanb will become famous soon enough

      0  

    Default


    I believe the loadPage method is the right one. Just use loadPage(1,...) for example instead of the normal load().

    Documentation : http://docs.sencha.com/touch/2-0/#!/...ethod-loadPage
    Twitter account @siebmanb.
    Co-founder & CEO at ButterflyEffect.
    Mobile application developer using Sencha Touch and Phonegap for iOS, Android and webapp.

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi