1. #1
    Sencha Premium Member
    Join Date
    Nov 2011
    Posts
    87
    Vote Rating
    1
    anarchos78 is on a distinguished road

      0  

    Default Extjs4 stores and records length

    Extjs4 stores and records length


    Hello friends

    I have in a viewport a textfield that it is for searching purpose. I have also a store that holds the data from the search queries. When user conducts a search and if query has results the store is populated with records. Each time user makes a search the store is updating with the new records. It is likely that some queries will not return results. So, what I want is when the search query don,t return any results not to update the store but retain the last successful query results. How can I do that?

    Thanks

    Tom

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,625
    Vote Rating
    398
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    You could have a search store that updates the main store on success.

    Regards,
    Scott.

  3. #3
    Sencha Premium Member
    Join Date
    Nov 2011
    Posts
    87
    Vote Rating
    1
    anarchos78 is on a distinguished road

      0  

    Default


    Hello,
    Thank for the reply. In my app i have only one store holding search results. Is it possible to achieve the above functionality with one store? If not can you point me in how to do it with two stores?

    Thank you again

    Tom

  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,625
    Vote Rating
    398
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    I will have to look into this. The idea is to maintain the previous results if the new result is null and display an error?

    I guess you could return success: false from the server if no records found to maintain current set.

    Scott.

Thread Participants: 1

Tags for this Thread

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