Results 1 to 6 of 6

Thread: Extensions and TreeStores

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User 6dust's Avatar
    Join Date
    Apr 2008
    Posts
    26
    Vote Rating
    0
      0  

    Default Extensions and TreeStores

    I've been having a heck of a time creating extensions that work with TreeStores. When filling out the "configs" section of the definition, a "type" equal to "store" has never worked. Once the extension is loaded in Architect, the store config will show a dropdown of stores, but any defined TreeStores are omitted.

    Previously I had gotten around this by defining my store config as a type "string" and then in the initComponent of the extension added in code like this:
    Code:
    if(typeof me.store === "string"){
        me.store = Ext.StoreManager.lookup(me.store);
    }
    This worked well as a workaround until I recently updated to the latest version of Architect (3.1.0.1851). Now the extension bombs once I assign a store with the error message of:

    Cannot call method 'getRootNode' of undefined

    It seems like the StoreManager.lookup() piece is no longer working.

    Are there any new workarounds, or better yet, a way of having TreeStores show up in the stores dropdown?

    Thanks,
    Eric

  2. #2
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488
    Vote Rating
    147
      0  

    Default

    Eric -

    Are you saying that you are developing an aux that uses a TreeStore and when you specify a store configuration it is only showing up with stores?

    I'll have to check out how we are keying on whether to show stores or treestores; it may be naive at this point and just check to see if you have a treepanel or not.
    Aaron Conran
    @aconran

  3. #3
    Sencha User 6dust's Avatar
    Join Date
    Apr 2008
    Posts
    26
    Vote Rating
    0
      0  

    Default

    Yes, I think that's what I'm saying.

    I was attempting to build a user extension for my team that is based on the TreePicker component and bring it into architect. When filling out the definition file for the component, in the "configs" section, if I add a config of type "store," Architect will show a list of stores to pick from, but this list won't contain any defined TreeStores.

  4. #4
    Sencha Premium Member ragzovskii's Avatar
    Join Date
    Sep 2012
    Location
    Krasnoyarsk, Russia
    Posts
    236
    Vote Rating
    20
      0  

    Default

    Is it fixed? I'm checking latest build and still cannot configure this.

  5. #5
    Sencha User
    Join Date
    Sep 2014
    Location
    Central Europe
    Posts
    795
    Vote Rating
    51
      0  

    Default

    Hello guys

    You can set-up the treestore config like this:

    Code:
    {    name: 'TreePanelStore',
        type: 'store',
        storeSelector: 'treestore'
    }
    Working example https://github.com/petrvecera/SenchaArchitect-aux , https://github.com/petrvecera/Sencha...inition.js#L20


    Petr

  6. #6
    Sencha User
    Join Date
    Sep 2014
    Location
    Central Europe
    Posts
    795
    Vote Rating
    51
      0  

    Default

    'storeSelector': 'treestore' // when you want to have treestore in there
    'storeSelector': '' // when you want all types of stores (the empty string is important)
    'storeSelector': 'calendar' // when you want calendar store

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •