1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    37
    Answers
    3
    Vote Rating
    0
    shivbhaw is on a distinguished road

      0  

    Default Answered: Stores and SubStores

    Answered: Stores and SubStores


    I´m just curious if this is possible.
    The ability to create a store, which contains data from either a json file or local storage.

    Then there´s a store which is linked to it that which gets its data from that store, and can be filtered to show certain data. This is for lists, so many lists can get their data from one store through a personal substore.

    Is this possible?
    I was hoping this would be possible because currently, my application creates alot of fields, alot containing xtype: 'field' with lists within them, and was wondering if this would help speed up the application.

  2. This would be possible but there is nothing within Sencha Touch that will do this out of the box.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,347
    Answers
    3542
    Vote Rating
    846
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    This would be possible but there is nothing within Sencha Touch that will do this out of the box.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    37
    Answers
    3
    Vote Rating
    0
    shivbhaw is on a distinguished road

      0  

    Default


    hey, thanks for the reply.

    well if done, would it help speed up the application if there are many stores in use?

  5. #4
    Sencha User
    Join Date
    Mar 2012
    Location
    Germany, Dresden
    Posts
    35
    Answers
    3
    Vote Rating
    1
    mrVVoo is on a distinguished road

      0  

    Default


    would this maybe be possible by using a DirectStore providing a delegate on the 'global' store as directFN

  6. #5
    Sencha User
    Join Date
    Feb 2012
    Posts
    37
    Answers
    3
    Vote Rating
    0
    shivbhaw is on a distinguished road

      0  

    Default


    thanks mrVVoo

    am not an advanced sencha user tho, so although i know a bit i dont really know how to use a direct store nor delegate.
    how would one go about doing this?

    thanks in advance!

  7. #6
    Sencha User
    Join Date
    Mar 2012
    Location
    Germany, Dresden
    Posts
    35
    Answers
    3
    Vote Rating
    1
    mrVVoo is on a distinguished road

      0  

    Default


    well, i have nearly the same problem. and I'm still searching for a nice solution. with a direct store you can specify your own methods for the crud operations which return the wished records. so you could specify a function which calls the super store to load the items, maybe applying some filters or options. the super store will store them and pass them in some way to your function.

    i need to try this solution, but this is not on top of my todo list. i need this solution for my bachelor thesis but there are other problems & questions that i have to solve and answer first.

    Take a look at DirectStore in Sencha Documentation. You'll need to provide the so called directFn (it should be possible to provide them for each of the CRUD operations). These methods need to call the super store's CRUD methods.

Thread Participants: 2